如何知道iOS 9中popover被解雇的时间:popoverControllerDidDismissPopover已弃用

Cra*_*lot 1 ios swift

这些职位在这里这里讨论如何当酥料饼的iOS中被解雇时的通知,但根据文档,主要代表职能popoverControllerShouldDismissPopover,并popoverControllerDidDismissPopover在iOS的9弃用.

那么当弹出窗口被解雇时,获得通知的正确方法是什么?

Ras*_*n L 8

请改用它

func popoverPresentationControllerDidDismissPopover(popoverPresentationController: UIPopoverPresentationController){

}
Run Code Online (Sandbox Code Playgroud)

UIPopoverPresentationControllerDelegate协议的方法允许您自定义基于popover的演示文稿的行为.弹出窗口控制器控制器在演示过程中的适当位置通知您的代理.您可以使用委托方法自定义此过程并动态响应更改.

Apple参考