I am trying to set the text label of a second view controller from the current view controller using the following code:
NSString *loadingString = [NSString stringWithFormat:@"Loading data from Instahotness....."];
self.loadingPage = [[LoadingPageViewController alloc]init];
self.loadingPage.loadingTextLabel.text = loadingString;
NSLog(@"LoadingPage text: %@",self.loadingPage.loadingTextLabel.text);
When I checked the console, the NSLog is returning me a <null> value for the loadingTextLable.text. Is there something I am doing wrong here? Note that in my LoadingPageViewController, I hooked up the UILabel called loadingTextLabel in my xib.
use initWithNibName to initialize LoadingPageViewController.