Sorry if this sounds dumb, complete swift noob here,
I'm trying to create the "Add to Apple Wallet" button. But I can't figure out how. I've tried the code snippet here, but nothing showed up on my screen in the simulator. My current code:
import UIKit
import PassKit
class ViewController: UIViewController {
@IBOutlet weak var button: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
addWalletButton()
}
private func addWalletButton() {
let passButton = PKAddPassButton(addPassButtonStyle: PKAddPassButtonStyle.black)
passButton.center = view.center
view.addSubview(passButton)
}
}
Any suggestions? Thanks.