Skip to content

Instantly share code, notes, and snippets.

@scott-lydon
Created September 23, 2022 04:16
Show Gist options
  • Save scott-lydon/516edfedfbe14bd477174ede3affbee2 to your computer and use it in GitHub Desktop.
Save scott-lydon/516edfedfbe14bd477174ede3affbee2 to your computer and use it in GitHub Desktop.
@IBAction func buyTapped(_ sender: Any) {
coordinator?.buySubscription(payload: "payload here")
}
// -------------------------------
func buySubscription(payload: String) {
let vc = BuyViewController.instantiate()
vc.payload = payload
vc.coordinator = self
navigationController.pushViewController(vc, animated: true)
}
// -------------------------------
class BuyViewController: UIViewController, Storyboarded {
weak var coordinator: MainCoordinator?
var payload: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment