Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. import UIKit
  2.  
  3. class AppCoordinator: Coordinator {
  4.  
  5. let window: UIWindow
  6. lazy var feedCoordinator: FeedCoordinator = {
  7. return FeedCoordinator(viewController: self.window.rootViewController!)
  8. }()
  9.  
  10. init(window: UIWindow) {
  11. self.window = window
  12. }
  13.  
  14. func start() {
  15. let viewController = SplashViewController.instantiate()
  16. viewController.transitionsDelegate = self
  17. window.rootViewController = viewController
  18. window.makeKeyAndVisible()
  19. }
  20.  
  21. }
  22.  
  23. extension AppCoordinator: SplashTransions {
  24.  
  25. func showHome() {
  26. feedCoordinator.start()
  27. }
  28.  
  29. func showLogin() {
  30. window.rootViewController?.present(LoginViewController.instantiate(), animated: false, completion: nil)
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement