user470763
user470763

Reputation:

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 the popover is a view controller on the navigation stack.

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

Upvotes: 0

Views: 1205

Answers (1)

edc1591
edc1591

Reputation: 10182

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.

Upvotes: 3

Related Questions