-
Notifications
You must be signed in to change notification settings - Fork 12
Getting Started with EmptyPage
EmptyPage is a powerful pure Swift library for managing empty state switching of view data sources. It provides you with the opportunity to use pure Swift alternatives in your next application.
- Support UICollectionView & UITableView by default managers
- Support UIView by custom managers
- Support any form of custom view
- Support global configuration view manager
- Provide pre-made templates
- Provide managers with state management
The simplest use case is to use the extension of UICollectionView to bind an empty state view:
let emptyView = CustomEmptyView()
collectionView.ep.set(emptyView: emptyView)
EmptyPage will automatically determine whether the data in the DataSource is empty after UICollectionView executes reloadData()
, and then decide whether to display the empty view.
Use pre-made templates to easily complete the configuration and binding of empty state pages:
We prepared a wiki page. You can find tons of useful things there.
- Installation Guide - Follow it to integrate EmptyPage into your project.
- Cheat Sheet - Curious about what EmptyPage could do and how would it look like when used in your project? See this page for useful code snippets. If you are already familiar with EmptyPage, you could also learn new tricks to improve the way you use EmptyPage!
- API Reference - Lastly, please remember to read the full whenever you may need a more detailed reference.
- iOS 9.0+
- Swift 4.0+
EmptyPage 4.x is NOT fully compatible with version 3.x.
I want to keep EmptyPage lightweight. This framework will focus on solving the empty state management of the view. This doesn’t mean the framework can’t be improved. EmptyPage is far from perfect, so necessary and useful updates will be made to make it better.
Any contributing and pull requests are warmly welcome. However, before you plan to implement some features or try to fix an uncertain issue, it is recommended to open a discussion first. It would be appreciated if your pull requests could build and with all tests green. :)