Skip to content

Instantly share code, notes, and snippets.

@aybarsyalcin
Last active December 19, 2022 10:56
Show Gist options
  • Save aybarsyalcin/b1f01946c651b6efc7e11d14db7aed71 to your computer and use it in GitHub Desktop.
Save aybarsyalcin/b1f01946c651b6efc7e11d14db7aed71 to your computer and use it in GitHub Desktop.
Flow Coordinators - Part 2
var rootViewController: UINavigationController = UINavigationController()
private lazy var applicationCoordinator: BaseCoordinator = self.makeCoordinator()
.....
.....
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
window.rootViewController = rootViewController
self.window = window
window.makeKeyAndVisible()
applicationCoordinator.start()
}
......
......
private func makeCoordinator() -> BaseCoordinator {
return ApplicationCoordinator(
router: RouterImp(rootController: self.rootViewController),
coordinatorFactory: CoordinatorFactoryImp()
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment