Crashalot
Crashalot

Reputation: 34513

How to know when popover dismissed in iOS 9: popoverControllerDidDismissPopover deprecated

These posts here and here discuss how to get notified when a popover gets dismissed in iOS, but according to the docs, the primary delegate functions popoverControllerShouldDismissPopover and popoverControllerDidDismissPopover are deprecated in iOS 9.

So what's the right way to get notified when a popover gets dismissed?

Upvotes: 1

Views: 2209

Answers (1)

Rashwan L
Rashwan L

Reputation: 38833

Use this instead

func popoverPresentationControllerDidDismissPopover(popoverPresentationController: UIPopoverPresentationController){

}

The methods of the UIPopoverPresentationControllerDelegate protocol let you customize the behavior of a popover-based presentation. A popover presentation controller notifies your delegate at appropriate points during the presentation process. You can use the delegate methods to customize this process and respond to changes dynamically.

Apple reference

Upvotes: 8

Related Questions