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)
}
}