Latest 1.2.6
Homepage https://github.com/mariohahn/StatusProvider
License MIT
Platforms ios 9.0, tvos 9.0, requires ARC
Authors

Carthage compatible

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

Latest podspec

{
    "name": "StatusProvider",
    "version": "1.2.6",
    "license": "MIT",
    "homepage": "https://github.com/mariohahn/StatusProvider",
    "authors": {
        "Mario Hahn": "[email protected]"
    },
    "summary": "Protocol to handle initial Loadings, Emty Views and Error Handling in a ViewController & views",
    "platforms": {
        "ios": "9.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/mariohahn/StatusProvider.git",
        "tag": "1.2.6"
    },
    "source_files": "StatusProvider/StatusProvider/*.{swift}",
    "requires_arc": true,
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This