Skip to content

Instantly share code, notes, and snippets.

@zafarivaev
Created January 5, 2020 12:16
Show Gist options
  • Select an option

  • Save zafarivaev/306284b2a38ff65f54755aebfcba47aa to your computer and use it in GitHub Desktop.

Select an option

Save zafarivaev/306284b2a38ff65f54755aebfcba47aa to your computer and use it in GitHub Desktop.
extension QuoteDetailViewController: PresenterToViewQuoteDetailProtocol {
func onGetImageFromURLSuccess(_ quote: String, character: String, image: UIImage) {
print("View receives the response from Presenter and updates itself.")
quoteLabel.text = quote
characterImageView.image = image
self.navigationItem.title = character
}
func onGetImageFromURLFailure(_ quote: String, character: String) {
print("View receives the response from Presenter and updates itself.")
quoteLabel.text = quote
self.navigationItem.title = character
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment