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.

49 lines
1.4 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 = RegisterWireframe()
  13. }
  14. extension SplashScreenWireframe: SplashScreenWireframeInput {
  15. var storyboardName: String {return "SplashScreen"}
  16. func getMainView() -> UIViewController {
  17. let service = SplashScreenService()
  18. let interactor = SplashScreenInteractor(service: service)
  19. let presenter = SplashScreenPresenter()
  20. let viewController = viewControllerFromStoryboard(of: SplashScreenViewController.self)
  21. viewController.presenter = presenter
  22. interactor.output = presenter
  23. presenter.interactor = interactor
  24. presenter.wireframe = self
  25. presenter.view = viewController
  26. self.view = viewController
  27. return viewController
  28. }
  29. func login() {
  30. if let navigation = self.view.navigationController {
  31. loginWireframe.pushMainView(in: navigation)
  32. }
  33. }
  34. func register() {
  35. if let navigation = self.view.navigationController {
  36. registerWireFrame.openRegistrationFromSplash(source: navigation)
  37. }
  38. }
  39. }