0
votes

I have some UITouch drag activity going on in the main view / controller that invokes a UIPopoverController. Surprisingly, the popover isn't dismissed when the user drags on the invoking view, though a single tap does dismiss it.

Does anyone know how to force a popover dismiss on a view drag? The view's touch events do not seem to be received, so my best guess is looking at the application's view events and try to figure out drags from there, but I'm not sure.

1

1 Answers

0
votes

When displayed, taps outside of the popover window cause the popover to be dismissed automatically. To allow the user to interact with the specified views and not dismiss the popover, you can assign one or more views to the passthroughViews property. Taps inside the popover window do not automatically cause the popover to be dismissed. Your view and view controller code must handle actions and events inside the popover explicitly and call the dismiss(animated:) method as needed.

Docs: https://developer.apple.com/documentation/uikit/uipopovercontroller