当我完成Apple Pay付款后,我想对另一个ViewController进行检查。这是在paymentAuthorizationViewController
还处于前台。
问题
当我在完成过程中调用dismiss(animated: true, completion: nil)
时,将关闭新的ViewController而不是paymentAuthorizationViewController
。
我该怎么做才能只关闭Apple Pay ViewController?
func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion: @escaping (PKPaymentAuthorizationStatus) -> Void) {
self.performSegue(withIdentifier: "segueToDanke", sender: self)
}
func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController) {
// Dismiss payment authorization view controller
dismiss(animated: true, completion: nil)
}