Latest 0.1.6
Homepage https://github.com/DavidKadlcek/EmptyStateView
License MIT
Platforms ios 10.0
Authors

Pod for easier work with Empty states in UI.

img

Usage

Basics

Init View

let emptyView = EmptyStateView(image: UIImage(named: "Your image name")!, title: "Opss...", message: "Something went wrong!", buttonText: "Try again")

Then you can add to view in your controller

view.addSubview(emptyView)
emptyView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
emptyView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
emptyView.widthAnchor.constraint(equalTo: view.widthAnchor).isActive = true
emptyView.heightAnchor.constraint(equalTo: view.heightAnchor).isActive = true

Design view on your own

You can change whatever you want, for example backgroundColor of button or radius

emptyView.button.backgroundColor = UIColor.red
emptyView.button.layer.cornerRadius = 8

Installation

CocoaPods

EmptyStateView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'EmptyStateView'

Author

David Kadlček, [email protected]

License

MIT

Latest podspec

{
    "name": "EmptyStateView",
    "version": "0.1.6",
    "summary": "Empty state view for your app",
    "description": "It makes your app better and more polite.",
    "homepage": "https://github.com/DavidKadlcek/EmptyStateView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "David Kadlu010dek": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DavidKadlcek/EmptyStateView.git",
        "tag": "0.1.6"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "5.0",
    "source_files": "EmptyStateView/EmptyStateView.swift"
}

Pin It on Pinterest

Share This