Last active
November 16, 2017 15:55
-
-
Save prostakm/1144ee71060d7e6be3fafc211ee71b8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModuleConnector { | |
weak var navigationController: UINavigationController? | |
init(navigationController: UINavigationController) { | |
self.navigationController = navigationController | |
} | |
func connect() { | |
let gateway = StaticDataGateway() | |
let useCase = ShowDataUseCase(dataGateway: gateway) | |
let presenter = ViewPresenter(useCase: useCase, connector: self) | |
let view = ViewController(presenter: presenter) | |
presenter.view = view | |
navigationController?.pushViewController(view, animated: true) | |
} | |
} | |
ModuleConnector(navigationController: UINavigationController(nibName: nil, bundle: nil)).connect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment