Ok, so, within SecondViewController, you've created a UserText UITextField - what's actually happening is:
SecondViewController *SecondView = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
SecondView.UserText = TextField.text;
- SecondViewController viewDidLoad called, UserText overwritten with correct reference via IBOutlet.
This is pretty much the mistake folks keep making; initialising the viewcontroller, is not a guarantee that the viewDidLoad is called when you want it to be.
So there's a few ways of doing this,
- Set an NSString property within SecondViewController
Pass the text into SecondViewController's initWithNibName method like so:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil text:(NSString *) text
Option 2 requires an NSString property. You can't assign text to a UILabel hooked up through an IBOutlet, this is because, viewDidLoad is not called as soon as you initialise the view controller.