Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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