Created
January 5, 2020 12:01
-
-
Save zafarivaev/804ddc1dd878d050118d4e6a45706803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension QuotesViewController: PresenterToViewQuotesProtocol{ | |
func onFetchQuotesSuccess() { | |
print("View receives the response from Presenter and updates itself.") | |
self.tableView.reloadData() | |
self.refreshControl.endRefreshing() | |
} | |
func onFetchQuotesFailure(error: String) { | |
print("View receives the response from Presenter with error: \(error)") | |
self.refreshControl.endRefreshing() | |
} | |
func showHUD() { | |
HUD.show(.progress, onView: self.view) | |
} | |
func hideHUD() { | |
HUD.hide() | |
} | |
func deselectRowAt(row: Int) { | |
self.tableView.deselectRow(at: IndexPath(row: row, section: 0), animated: true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment