Skip to content

DavidKadlcek/EmptyStateView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmptyStateView

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, da.developer605@gmail.com

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages