【发布时间】:2015-08-16 21:32:36
【问题描述】:
使用下面的标准 UIAlertView 代码将在 Apple Pay PKPaymentAuthorizationViewController 表下方显示警报。
[[[UIAlertView alloc] initWithTitle:@"Payment Error"
message:[error localizedDescription]
delegate:nil
cancelButtonTitle:@"Okay"
otherButtonTitles:nil] show];
如何在付款授权表上方显示?或者是否有不同的方式显示 Apple Pay 的错误消息?当用户输入无效的送货地址时,我想给出具体的错误消息。
【问题讨论】:
-
您如何呈现警报?我对applepay不是很了解,但是既然是视图控制器,那你是不是在applepayviewcontroller的视图上呈现alert呢?
-
不确定您的部署目标。我认为不是
showing 一个UIAlertView,presenting 一个UIAlertController可能是一个更好的主意。只要您有对要在其上显示警报的UIViewController的引用,这应该不是问题。
标签: ios objective-c applepay