Why is popoverPresentationControllerShouldDismissPopover deprecated?

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

Answered by Hardy in 400478022

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.

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.

Accepted Answer

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.
Why is popoverPresentationControllerShouldDismissPopover deprecated?
 
 
Q