Skip to content

Instantly share code, notes, and snippets.

@ivangodfather
Forked from anonymous/gist:b35e86ea052464e3bbc8
Last active November 5, 2015 18:16
Show Gist options
  • Save ivangodfather/46d768773e9c6eaeb7df to your computer and use it in GitHub Desktop.
Save ivangodfather/46d768773e9c6eaeb7df to your computer and use it in GitHub Desktop.
class CarListPresenter {
private let ui: CarListUI
private let useCase: GetCarList
private let wireFrame: CarWireframe
init(ui: CarListUI, useCase: GetCarList,) {
self.ui = ui
self.useCase = useCase
}
func viewDidLoad() {
useCase.execute { result in
self.ui.showCars(result.value!)
}
}
func viewDetail() {
wireFrame.goToDetailCar()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment