StatusProvider

在 ViewController 和视图中处理初始加载、空视图和错误处理的协议。「Protocol to handle initial Loadings, Empty Views and Error Handling in a ViewController & views」

Github stars Tracking Chart

Carthage compatible

StatusProvider

Screenshot

Protocol to handle initial Loadings, Empty Views and Error Handling in a ViewController & views

CocoaPods Podfile

pod 'StatusProvider'

Functions

  • Loading
  • EmptyView
  • Error Handling

How to use?


class ErrorViewController: UIViewController, StatusController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "Error"

        let status = Status(title: "Error", description: "Oh... fu**", actionTitle: "Retry 🚀") {

        }
        show(status: status)        
    }
}

class ActivityViewController: UIViewController, StatusController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "Loading"

        let status = Status(isLoading: true, description: "Lädt…")

        show(status: status)
    }
}

class EmptyViewController: UIViewController, StatusController {

    override func viewDidLoad() {
        super.viewDidLoad()

        title = "Empty"

        let status = Status(title: "no Data", description: "No data available.💣", actionTitle: "Create ⭐️", image: UIImage(named: "placeholder_instagram")) {
            self.hideStatus()
        }    

        show(status: status)        
    }
}

Overview

Name With Ownermariohahn/StatusProvider
Primary LanguageSwift
Program languageSwift (Language Count: 3)
Platform
License:MIT License
Release Count19
Last Release Name1.2.10 (Posted on 2018-09-14 19:01:18)
First Release Namev1.0.0 (Posted on 2016-08-25 14:58:56)
Created At2016-08-25 12:35:39
Pushed At2018-09-14 17:01:25
Last Commit At2018-09-14 19:01:04
Stargazers Count879
Watchers Count22
Fork Count47
Commits Count70
Has Issues Enabled
Issues Count11
Issue Open Count5
Pull Requests Count2
Pull Requests Open Count0
Pull Requests Close Count0
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top