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.
|
|
// // SplashScreenPresenter.swift // GMERemittance // // Created by gme_2 on 10/09/2018. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. //
import Foundation
class SplashScreenPresenter { // MARK: Properties weak var view: SplashScreenViewInterface? var interactor: SplashScreenInteractorInput? var wireframe: SplashScreenWireframeInput? // MARK: Converting entities }
// MARK: SplashScreen module interface
extension SplashScreenPresenter: SplashScreenModuleInterface { func login() { self.wireframe?.login() } func register() { self.wireframe?.register() } func fetchExchangeRate() { view?.showLoading() interactor?.fetchExchangeRate() } func exchangeCalculate(use model: ExchangeRateRequestModel) { view?.showLoading() interactor?.exchangeCalculate(use: model) } }
// MARK: SplashScreen interactor output interface
extension SplashScreenPresenter: SplashScreenInteractorOutput { func setModel(with model: [ExchangeRateModel]?) { view?.hideLoading() view?.setModel(with: model) } func setModel(with model: ExchangeRateDetailModel?) { view?.hideLoading() view?.setModel(with: model) } func setError(with error: Error) { view?.hideLoading() view?.setError(with: error) } }
|