It is rather strange method call. You should do this instead:
self.phone = [self createTextFieldWithRect:CGRectMake(25, 100, 250, 60) AndText:@"Phone Number"];
And the method returns the initiated text field as output.
-(UITextField *)createTextFieldWithRect:(CGRect)rect AndText:(NSString*)inText
{
UITextField *text = [[UITextField alloc] initWithFrame:rect];
text.borderStyle = UITextBorderStyleRoundedRect;
text.font = [UIFont systemFontOfSize:26];
text.textColor=[UIColor blackColor];
text.placeholder = inText;
text.font=[UIFont fontWithName:@"Apple SD Gothic Neo" size:26];
text.autocorrectionType = UITextAutocorrectionTypeNo;
text.keyboardType = UIKeyboardTypeDefault;
text.returnKeyType = UIReturnKeyDone;
text.clearButtonMode = UITextFieldViewModeWhileEditing;
text.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[text setDelegate:self];
[self.view addSubview:text];
return text;
}
The thing is, in the current implementation, you are sending the null object into the function. The compiler would not have the reference to the self.phone object yet. (It has not been created.)