Skip to content

Instantly share code, notes, and snippets.

@zafarivaev
Last active January 23, 2020 17:26
Show Gist options
  • Save zafarivaev/a6936b35339b8724e40b2d62b01bf2c7 to your computer and use it in GitHub Desktop.
Save zafarivaev/a6936b35339b8724e40b2d62b01bf2c7 to your computer and use it in GitHub Desktop.
extension QuoteDetailPresenter: InteractorToPresenterQuoteDetailProtocol {
func getImageFromURLSuccess(quote: APIQuote, data: Data?) {
print("Presenter receives the result from Interactor after it's done its job.")
view?.onGetImageFromURLSuccess(quote.quote!, character: quote.character!, image: ImageDataService.shared.convertToUIImage(from: data!))
}
func getImageFromURLFailure(quote: APIQuote) {
print("Presenter receives the result from Interactor after it's done its job.")
view?.onGetImageFromURLFailure(quote.quote!, character: quote.character!)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment