Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- class AppCoordinator: Coordinator {
- let window: UIWindow
- lazy var feedCoordinator: FeedCoordinator = {
- return FeedCoordinator(viewController: self.window.rootViewController!)
- }()
- init(window: UIWindow) {
- self.window = window
- }
- func start() {
- let viewController = SplashViewController.instantiate()
- viewController.transitionsDelegate = self
- window.rootViewController = viewController
- window.makeKeyAndVisible()
- }
- }
- extension AppCoordinator: SplashTransions {
- func showHome() {
- feedCoordinator.start()
- }
- func showLogin() {
- window.rootViewController?.present(LoginViewController.instantiate(), animated: false, completion: nil)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement