Do UIPopoverController NOT retire?

I am showing a UIPopovercontroller which naturally deflects when the user touches it somewhere outside of it.

Is there a way to keep it from straying away from itself when touched at all? I would prefer to manually dismiss it when the user has taken an action internally.



source to share

1 answer

From the docs in UIPopoverController:

passthroughViews An array of views that the user can interact with while visible, apparently.

@property (non-atomic, copy) NSArray * passthroughViews

Just set this so that you want to remain interactive (self.view for everything) and the popover "ignores" firing from those views. This is pretty handy and available in version 3.2+, making it easier to write legacy code.



All Articles