Skip to content

Instantly share code, notes, and snippets.

@prostakm
Created November 16, 2017 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prostakm/f02e524007b7b1987466448f1616153d to your computer and use it in GitHub Desktop.
Save prostakm/f02e524007b7b1987466448f1616153d to your computer and use it in GitHub Desktop.
protocol Presenter {
func viewLoaded()
}
class ViewPresenter: Presenter {
let useCase: UseCase
let connector: ModuleConnector
weak var view: View?
init(useCase: UseCase, connector: ModuleConnector) {
self.useCase = useCase
self.connector = connector
}
func viewLoaded() {
let data = useCase.execute().uppercased()
view?.show(data: data)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment