开发者

Update UISplitView's DetailView from Second Level Navigation

开发者 https://www.devze.com 2023-01-30 02:23 出处:网络
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 try

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

精彩评论

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

关注公众号