Skip to content

Instantly share code, notes, and snippets.

Last active June 5, 2017 09:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save LH17/97188d58872750a77be25a127569087e to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment