开发者

Pushing view controller from popover controller

I have a Popover which I present from a bar button over a navigation controller. This popover will act as a menu. When a row is pressed I want to push a new view controller on the navigation stack.

How do I communicate between the two classes though? The table in the popover is controlled via a UITableViewController subclass and the class that presents 开发者_如何学JAVAthe popover is a view controller on the navigation stack.

Any ideas, I'm really stuck on this one.


You can use NSNotificationCenter. Just add an observer in the main view somewhere (probably in the viewDidLoad method. Then when the row is tapped in the UIPopoverController post the notification. Here's a guide to help you out.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜