My iPad app has several data gathering popovers, and I want to be able to disable the dismissal of the popover by touching outside of it, I then will use a button to quit the popover at the users discretion.
The app looks great, the popovers work fine, and I have a button inside them that quits nicely. Only I can't find a way of disabling dismissal in Swift, lots of posts on obj-c but nothing in Swift.
Does this mean that the functionality is no longer available?
I would greatly appreciate any help to my frustration.
Simply set the view controller's
modalInPopover
totrue
and the popover'spassthroughViews
tonil
. But you must do the latter using delayed performance or it won't work. A small delay is all that's needed. Example:For the
delay
function, see dispatch_after - GCD in swift?.