How to update a detailView in a splitViewController?

Posted by pikebu on Stack Overflow See other posts from Stack Overflow or by pikebu
Published on 2010-02-12T13:31:40Z Indexed on 2010/03/08 23:36 UTC
Read the original article Hit count: 478

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.

© Stack Overflow or respective owner

Related posts about uisplitviewcontroller

Related posts about uisplitview