Hi all, I'm just wondering why when I create a new view controller, I have to push the controller onto the stack before assigning values to its properties? Why, if I assign a value before the push, are the values not sent to the navigation controller as well?
this works:
SomeViewController *newViewController = [[NewViewController alloc]initWith....];
[self.navigationController pushViewcontroller:newViewController animated:YES];
newViewController.property = value;
this doesn't:
SomeViewController *newViewController = [[NewViewController alloc]initWith....];
newViewController.property = value;
[self.navigationController pushViewcontroller:newViewController animated:YES];
Similarly, if my new view controller has a UITextView property, I can't access it as an instance variable until after I've pushed it onto the navigation stack. I would have thought the instance variable would be accessible once I've instantiated the controller?
Thanks for reading!