Created
March 20, 2022 11:21
-
-
Save metin-atalay/79f0406c7168967f7755fed09169c1a1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Foundation | |
import UIKit | |
class WeatherListWireFrame: WeatherListWireFrameProtocol { | |
class func createWeatherListModule() -> UIViewController { | |
let navController = mainStoryboard.instantiateViewController(withIdentifier: "WeathersNavigationController") | |
if let view = navController.childViewControllers.first as? WeatherListViewController { | |
let presenter: WeatherListPresenterProtocol & WeatherListInteractorOutputProtocol = WeatherListPresenter() | |
let interactor: WeatherListInteractorInputProtocol & WeatherListRemoteDataManagerOutputProtocol = WeatherListInteractor() | |
let remoteDataManager: WeatherListRemoteDataManagerInputProtocol = WeatherListRemoteDataManager() | |
let wireFrame: WeatherListWireFrameProtocol = WeatherListWireFrame() | |
view.presenter = presenter | |
presenter.view = view | |
presenter.wireFrame = wireFrame | |
presenter.interactor = interactor | |
interactor.presenter = presenter | |
interactor.remoteDatamanager = remoteDataManager | |
remoteDataManager.remoteRequestHandler = interactor | |
return view | |
} | |
return UIViewController() | |
} | |
static var mainStoryboard: UIStoryboard { | |
return UIStoryboard(name: "Main", bundle: Bundle.main) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment