Alex Rivera | Logout

ipad detect when UIPopoverControllers are dismissed

Asked 2011-01-02T23:12:39.047
9

I have several uiPopoverControllers in my universal iPad app. I now have a requirement to trigger a function once a certain popover has been dismissed. I can do this easily if the user clicks "close" inside the popover, but if they touch the screen to hide the popover, I cannot trigger my function.

I've been googling for some time and cannot seem to find any delegate methods which I might be able to use in my main view controller to capture them. I would love something like didDismissPopoverController - but my guess is it's not available.

IF not, I guess the only thing to do would be to detect the touches and trigger then? Basically I am highlighting a UITableView row and loading the popover. I need to deselect the row - so want to simply call [table reloaddata].

Thanks for any help on this one!

Edit
Report

1 Answer

4

You can use the popoverControllerDidDismissPopover delegate method after the following assignment: self.popoverController.delegate = self;

Note that popoverControllerDidDismissPopover delegate method does not get called if you programmatically call [self.popoverController dismissPopoverAnimated:YES].

answered 2012-05-05T21:04:47.070

Your Answer