I have a Catalyst app that uses popovers frequently, and I'd love to have them stay active when the app loses focus. It appears this is controlled in a native AppKit app via NSPopover.Behavior
. Is this functionality exposed somewhere in Catalyst?
How can I make a popover stay visible when my Catalyst app loses focus?
FB16114803
Set the modalInPresentation
property of the view controller you are presenting in a popover to true
. This will prevent it from being dismissed automatically when run on macOS via Mac Catalyst.
This also prevents the popover from dismissed on an iPad simply by tapping outside of the popover.