Created
August 11, 2021 12:06
-
-
Save nabs107/485da80b0b96b1a7f55b992b9e59705d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // MainCoordinator.swift | |
| // ModularProject | |
| // | |
| // Created by Nabin Shrestha on 7/28/21. | |
| // | |
| import UIKit | |
| import Login | |
| final class MainCoordinator: Coordinator, ViewControllerCoordinatorDelegate { | |
| var childCoordinators = [Coordinator]() | |
| var navigationController: UINavigationController | |
| init(navigationController: UINavigationController) { | |
| self.navigationController = navigationController | |
| } | |
| func start() { | |
| let viewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(identifier: "ViewController") as! ViewController | |
| viewController.viewControllerCoordinatorDelegate = self | |
| navigationController.pushViewController(viewController, animated: true) | |
| } | |
| func login() { | |
| let viewController = LoginViewController() | |
| navigationController.pushViewController(viewController, animated: true) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment