Skip to content

Instantly share code, notes, and snippets.

@jazzbpn
Last active July 4, 2018 07:40
Show Gist options
  • Save jazzbpn/003b733ccd3163939a0bfb90a9b028d8 to your computer and use it in GitHub Desktop.
Save jazzbpn/003b733ccd3163939a0bfb90a9b028d8 to your computer and use it in GitHub Desktop.
import Foundation
import UIKit
class NoticePresenter:ViewToPresenterProtocol {
var view: PresenterToViewProtocol?
var interactor: PresenterToInteractorProtocol?
var router: PresenterToRouterProtocol?
func startFetchingNotice() {
interactor?.fetchNotice()
}
func showMovieController(navigationController: UINavigationController) {
router?.pushToMovieScreen(navigationConroller:navigationController)
}
}
extension NoticePresenter: InteractorToPresenterProtocol{
func noticeFetchedSuccess(noticeModelArray: Array<NoticeModel>) {
view?.showNotice(noticeArray: noticeModelArray)
}
func noticeFetchFailed() {
view?.showError()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment