以下代码来自WWDC 2015 Session 702 Apple Pay in Apps - Emporium:Apple Pay的简单购物体验
if PKPaymentAuthorizationViewController.canMakePaymentsUsingNetworks(ProductTableViewController.supportedNetworks) {
let button = PKPaymentButton(type: .Buy, style: .Black)
button.addTarget(self, action: #selector(ProductTableViewController.applePayButtonPressed), forControlEvents: .TouchUpInside)
button.center = applePayView.center
button.autoresizingMask = [.FlexibleLeftMargin, .FlexibleRightMargin]
applePayView.addSubview(button)
}
Run Code Online (Sandbox Code Playgroud)
我想知道我们是否可以在IB中创建这个按钮.