gpt4 book ai didi

ios - 有什么方法可以检测它何时触及 Apple Pay PKPaymentAuthorizationViewController 上的取消按钮?

转载 作者:可可西里 更新时间:2023-11-01 03:45:24 25 4
gpt4 key购买 nike

每当 PKPaymentAuthorizationViewController 因任何原因被关闭时,Apple Pay 都会调用以下委托(delegate)。有什么方法可以检测只是 Cancel 按钮被触摸了吗?

- (void)paymentAuthorizationViewControllerDidFinish:(PKPaymentAuthorizationViewController *)controller
{
[self dismissViewControllerAnimated:YES completion:nil];
}

enter image description here

最佳答案

来自documentation for paymentAuthorizationViewControllerDidFinish :

When the user authorizes a payment request, this method is called after the status from the paymentAuthorizationViewController:didAuthorizePayment:completion: method’s completion block has been shown to the user. When the user cancels without authorizing the payment request, only paymentAuthorizationViewControllerDidFinish: is called.

如果

paymentAuthorizationViewController:didAuthorizePayment:completion:

不是先被调用,然后用户点击取消按钮(否则 Controller 以某种方式被取消)。

关于ios - 有什么方法可以检测它何时触及 Apple Pay PKPaymentAuthorizationViewController 上的取消按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35903253/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com