iOS。在关闭时导致未调用viewWillAppear的情况下,请使用UIPresentationController将modalPresentationStyle设置为.custom。

时间:2018-08-22 05:30:47

标签: ios viewwillappear uimodalpresentationstyle uipresentationcontroller

iOS。在关闭时导致未调用viewWillAppear的情况下,使用UIPresentationController将modalPresentationStyle设置为.custom。

class GCStoryboardSegue: UIStoryboardSegue {

override func perform() {
    let presentationController = GCPresentationController(presentedViewController: destination, presenting: source)
    destination.modalPresentationStyle = .custom
    destination.transitioningDelegate = presentationController
    source.present(destination, animated: true, completion: nil)
}
}

0 个答案:

没有答案