Created
March 24, 2020 19:41
-
-
Save gamzeguven/4552362a2c1d3eec618a31c41fa2081f 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
import UIKit | |
protocol HomePresenterInterface { | |
func viewDidLoad() | |
} | |
class HomePresenter { | |
weak var view: HomeViewControllerInterface? | |
var interactor: HomeInteractorInterface | |
var router: HomeRouterInterface | |
init(view: HomeViewControllerInterface, interactor: HomeInteractorInterface, router: HomeRouterInterface) { | |
self.view = view | |
self.interactor = interactor | |
self.router = router | |
} | |
} | |
extension HomePresenter: HomePresenterInterface { | |
func viewDidLoad() { | |
let homeModel = self.interactor.getTitle() | |
print("Home Model value is \(homeModel)") | |
view?.updateTitle() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment