Skip to content

Instantly share code, notes, and snippets.

@scott-lydon
Created September 23, 2022 02:42
Show Gist options
  • Save scott-lydon/66288a6292d60798fe638051a83b4851 to your computer and use it in GitHub Desktop.
Save scott-lydon/66288a6292d60798fe638051a83b4851 to your computer and use it in GitHub Desktop.
import UIKit
extension ViewController {
@IBAction func blueTapped(_ sender: Any) {
coordinator?.goToBlueView()
}
}
extension MainCoordinator {
func goToBlueView() {
let vc = BlueViewController.instantiate()
vc.coordinator = self
navigationController.pushViewController(vc, animated: true)
}
}
class BlueViewController: UIViewController, Storyboarded {
weak var coordinator: Coordinator?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment