我一直在想这个,我收到这个错误:
error: init(type:style) is unavailable
Swift 4中的PKPaymentButton创建错误
经过5个小时的点击后尝试将swift的版本从4.0更改为3.2然后构建成功。
这是一个迅速的错误吗?有人提出过错误吗?
我的XCode是9.2
似乎Swift 4和iOS 11 SDK不再导入init(type:style:)
。
也许你可以使用init(paymentButtonType:paymentButtonStyle:)
init(paymentButtonType: PKPaymentButtonType, paymentButtonStyle: PKPaymentButtonStyle)