开发者

Update UISplitView's DetailView from Second Level Navigation

I have an iPad app with a UISplitView. In the Root View I have a two level UITableView Navigatio开发者_运维技巧n(it takes its content from a plist). In the Detail View I have a UIWebView that I am trying to update. I can update the Detailview from the 1st level navigation, but when I push the second level nav and try to update the detailview, it does not work.

Basically, the second level Nav doesn't have access to self.DetailViewController(like the 1st level does). How do I get access to the DetailViewController from the "pushed" second level so I can update its UIWebView?

Any help would be great. Thank you!


You can add the detailViewController as a property for your SecondLevelViewController and before you push the controller you just set the property.

SecondLevelViewController *secondController = ...
secondController.detailViewController = self.detailViewController;
[self.navigationController pushViewController:secondController animated:YES];

And in SecondLevelViewController you define the property for DetailViewController just as it is defined in RootViewController.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜