Pod for easier work with Empty states in UI.
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 = trueYou can change whatever you want, for example backgroundColor of button or radius
emptyView.button.backgroundColor = UIColor.red
emptyView.button.layer.cornerRadius = 8EmptyStateView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'EmptyStateView'
David Kadlček, da.developer605@gmail.com
MIT
