How to update a detailView in a splitViewController?
- by pikebu
Hello,
I'm trying to update a detailView in a splitViewController.
This is what I try:
//Get the application delegate
AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
//Get the masterViewController
MasterViewController *master = [delegate.splitViewController.viewControllers objectAtIndex:0];
This seems to work fine so far.
Then I try to update a label in the detailViewController by doing this:
master.detailViewController.myLabel.text = "someText";
But this doesn't work. (ignore the missing at sign in front of the "someText" - I have it, but it seems it's not allowed to put it in this forum.)
So how is the right way to access the outlets of in the detailView?
Thanks for help.