Contents

popoverPresentationControllerShouldDismissPopover(_:)

Asks the delegate if the popover should be dismissed.

Declaration

optional func popoverPresentationControllerShouldDismissPopover(_ popoverPresentationController: UIPopoverPresentationController) -> Bool

Parameters

  • popoverPresentationController:

    The popover presentation controller that is managing the popover interface.

Return Value

true if the popover should be dismissed or false if it should not.

Discussion

The popover presentation controller calls this method in response to user-initiated attempts to dismiss the popover. It is not called when you dismiss the popover programmatically using the dismissModalViewControllerAnimated: method.

If you do not implement this method in your delegate, the default return value is assumed to be true.

See Also

Presenting and dismissing the popover