You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

  1. //
  2. // SplashScreenWireframe.swift
  3. // GMERemittance
  4. //
  5. // Created by gme_2 on 10/09/2018.
  6. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. class SplashScreenWireframe {
  10. weak var view: UIViewController!
  11. lazy var loginWireframe = LoginWireframe()
  12. lazy var registerWireFrame = VerifyIDNumberWireframe()
  13. lazy var existingUserRegisterWireFrame = ExistingUserRegistrationWireframe()
  14. }
  15. extension SplashScreenWireframe: SplashScreenWireframeInput {
  16. var storyboardName: String {return "SplashScreen"}
  17. func getMainView() -> UIViewController {
  18. let service = SplashScreenService()
  19. let interactor = SplashScreenInteractor(service: service)
  20. let presenter = SplashScreenPresenter()
  21. let viewController = viewControllerFromStoryboard(of: SplashScreenViewController.self)
  22. viewController.presenter = presenter
  23. interactor.output = presenter
  24. presenter.interactor = interactor
  25. presenter.wireframe = self
  26. presenter.view = viewController
  27. self.view = viewController
  28. return viewController
  29. }
  30. func login() {
  31. if let navigation = self.view.navigationController {
  32. loginWireframe.pushMainView(in: navigation)
  33. }
  34. }
  35. func register() {
  36. if let navigation = self.view.navigationController {
  37. self.registerWireFrame.pushMainView(in: navigation)
  38. }
  39. }
  40. func existingUserRegister() {
  41. if let navigation = self.view.navigationController {
  42. existingUserRegisterWireFrame.pushMainView(in: navigation)
  43. }
  44. }
  45. }