If you want to dismiss a popover -- for example, from a button within the popover's contentViewController you must --
- Create a reference to the popover to be held by view controller which creates it
- Create a notification from the contentViewController to let the owning view controller know that it should be dismissed, or alternately create a delegate for the same purpose
- Send the notification or delegate message when the popover is ready to be dismissed
- Call
dismissPopover:animated
when the notification or delegate method is called
Meanwhile, from a UIViewController
you can access the modal view controller, the parent view controller, the navigation controller, the split view controller, the tab bar controller, the search display controller, the child view controllers, the presenting view controllers, and the presented view controllers.
Is there a better approach to do this from popover's contentViewController?