Search code examples
iosxcodeuinavigationcontrolleruipopovercontroller

UIPopoverController Dismissal


Is there a method called when UIPopoverController is dismissed by a touch anywhere outside the rectangle of UIPopoverController itself?

Status:

firstView has a navBar. Its UINavBarItem calls a UIPopoverController by touch which sets a few values for firstView, so firstView has to be updated when UIPopoverController is dismissed.

(P.S. viewDidAppear does not work!)

Thanks!


Solution

  • Assign a delegate to the popover; then you have both popoverControllerDidDismissPopover: and popoverControllerShouldDismissPopover:

    http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPopoverControllerDelegate_protocol/Reference/Reference.html