dzenbot/DZNEmptyDataSet is a Objective-C project with 12.0k stars. A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Add your project to the list here and provide a (320px wide) render of the result.
The Empty Data Set Pattern
Also known as Empty State or Blank Slate.
Most applications show lists of content (data sets), which many turn out to be empty at one point, specially for new users with blank accounts. Empty screens create confusion by not being clear about what's going on, if there is an error/bug or if the user is supposed to do something within your app to be able to consume the content.
Please read this very interesting article about Designing For The Empty States.
(These are real life examples, available in the 'Applications' sample project in the v2-Swift branch)
Empty Data Sets are helpful for:
Avoiding white-screens and communicating to your users why the screen is empty.
Calling to action (particularly as an onboarding process).
Avoiding other interruptive mechanisms like showing error alerts.
Being consistent and improving the user experience.
Delivering a brand presence.
Features
Compatible with UITableView and UICollectionView. Also compatible with UISearchDisplayController and UIScrollView.
Gives multiple possibilities of layout and appearance, by showing an image and/or title label and/or description label and/or button.
Uses NSAttributedString for easier appearance customisation.
Uses auto-layout to automagically center the content to the tableview, with auto-rotation support. Also accepts custom vertical and horizontal alignment.
Background color customisation.
Allows tap gesture on the whole tableview rectangle (useful for resigning first responder or similar actions).
For more advanced customisation, it allows a custom view.
Compatible with Storyboard.
Compatible with iOS 6, tvOS 9, or later.
Compatible with iPhone, iPad, and Apple TV.
App Store ready
This library has been designed in a way where you won't need to extend UITableView or UICollectionView class. It will still work when using UITableViewController or UICollectionViewController.
By just conforming to DZNEmptyDataSetSource & DZNEmptyDataSetDelegate, you will be able to fully customize the content and appearance of the empty states for your application.
Installation
Available in CocoaPods
pod 'DZNEmptyDataSet'
To integrate DZNEmptyDataSet into your Xcode project using Carthage, specify it in your Cartfile:
github "dzenbot/DZNEmptyDataSet"
To integrate DZNEmptyDataSet into your Xcode project using SPM, specify it in your Package.swift:
For existing, go to "File Navigator" -> "Select Project" -> "Project Name" -> "Swift Packages" -> "+" -> Paste "https://github.com/dzenbot/DZNEmptyDataSet" and proceed to select your target.
How to use
For complete documentation, visit CocoaPods' auto-generated doc
- (void)emptyDataSet:(UIScrollView *)scrollView didTapView:(UIView *)view
{
// Do something
}
Notifies when the data set call to action button was tapped:
- (void)emptyDataSet:(UIScrollView *)scrollView didTapButton:(UIButton *)button
{
// Do something
}
Refresh layout
If you need to refresh the empty state layout, simply call:
[self.tableView reloadData];
or
[self.collectionView reloadData];
depending of which you are using.
Force layout update
You can also call [self.tableView reloadEmptyDataSet] to invalidate the current empty state layout and trigger a layout update, bypassing -reloadData. This might be useful if you have a lot of logic on your data source that you want to avoid calling, when not needed. [self.scrollView reloadEmptyDataSet] is the only way to refresh content when using with UIScrollView.
Sample projects
Applications
This project replicates several popular application's empty states (~20) with their exact content and appearance, such as Airbnb, Dropbox, Facebook, Foursquare, and many others. See how easy and flexible it is to customize the appearance of your empty states. You can also use this project as a playground to test things.
Countries
This project shows a list of the world countries loaded from CoreData. It uses NSFecthedResultController for filtering search. When searching and no content is matched, a simple empty state is shown. See how to interact between the UITableViewDataSource and the DZNEmptyDataSetSource protocols, while using a typical CoreData stack.
Colors
This project is a simple example of how this library also works with UICollectionView and UISearchDisplayController, while using Storyboards.
Collaboration
Feel free to collaborate with ideas, issues and/or pull requests.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
How active is development on dzenbot/DZNEmptyDataSet?
The most recent commit recorded on dzenbot/DZNEmptyDataSet was 4.3 years ago, based on the GitHub push timestamp. The repository has 1.7k forks — one of the better signals of community interest.
How many stars does dzenbot/DZNEmptyDataSet have?
dzenbot/DZNEmptyDataSet has 12.0k GitHub stars — refresh the page for the live number, or check github.com/dzenbot/DZNEmptyDataSet. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is dzenbot/DZNEmptyDataSet open source?
Yes — dzenbot/DZNEmptyDataSet ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/dzenbot/DZNEmptyDataSet.
What is dzenbot/DZNEmptyDataSet?
dzenbot/DZNEmptyDataSet (dzenbot/DZNEmptyDataSet) is a Objective-C project on GitHub. From the project's own README: A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display
Where do I read more about dzenbot/DZNEmptyDataSet?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/dzenbot/DZNEmptyDataSet is the definitive source.
Read full README in the tab above.
Curious whether DZNEmptyDataSet is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about DZNEmptyDataSet.