StateViewController
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
class StateViewController: UIViewController {} | |
extension StateViewController: ViewStateProtocol { | |
@objc func handleTap(_ sender: UIView) { | |
// for showing the loader | |
addView(withState: .loading) | |
// for showing the error message | |
addView(withState: .error) | |
// for showing the empty results message label | |
addView(withState: .empty) | |
// for removing all the views | |
removeAllViews() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment