Why is popoverPresentationControllerShouldDismissPopover deprecated?

Why is popoverPresentationControllerShouldDismissPopover deprectated, respectively what is going to replace this functionality?

Accepted Reply

I did not call popoverPresentationControllerShouldDismissPopover by myself. This method is called by the popover presentation controller beforre it dismisses the popover.


BTW: I have overseen that UIAdaptivePresentationControllerDelegate implements a method

presentationControllerShouldDismiss. Therefore, popoverPresentationControllerShouldDismissPopover is not needed anymore.

Replies

Why ?

I guess that now system handles it systematically and does not want to return false.

If you had code to include inside, you probably could use

optional func prepareForPopoverPresentation(_ popoverPresentationController: UIPopoverPresentationController)


Could you show how you called it ?

Note that this was not called when popover dismissed from code programmatically.

I did not call popoverPresentationControllerShouldDismissPopover by myself. This method is called by the popover presentation controller beforre it dismisses the popover.


BTW: I have overseen that UIAdaptivePresentationControllerDelegate implements a method

presentationControllerShouldDismiss. Therefore, popoverPresentationControllerShouldDismissPopover is not needed anymore.