StatusProvider
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)
}
}

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

