WLEmptyState alternatives and similar libraries
Based on the "UITableView" category.
Alternatively, view WLEmptyState alternatives based on common mentions on social networks and blogs.
-
folding-cell
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
DGElasticPullToRefresh
Elastic pull to refresh for iOS developed in Swift -
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift -
HGPlaceholders
Nice library to show placeholders and Empty States for any UITableView/UICollectionView in your project -
ReverseExtension
A UITableView extension that enables cell insertion from the bottom of a table view. -
ExpandableCell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 5 -
GridView
Reusable GridView with excellent performance and customization that can be time table, spreadsheet, paging and more. -
DiffableDataSources
💾 A library for backporting UITableView/UICollectionViewDiffableDataSource. -
PullToRefreshSwift
iOS Simple Cool PullToRefresh Library. It is written in pure swift. -
KJCategories
Collection of native ios extensions and classes to boost development process. Such as UIKit, Foundation, QuartzCore, Accelerate, OpenCV, CoreGraphics, os and more. 超实用开发加速工具收集 -
QuickTableViewController
A simple way to create a UITableView for settings in Swift. -
YNExpandableCell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 4 -
CollapsibleTableSectionViewController
:tada: Swift library to support collapsible sections in a table view. -
ExpyTableView
Make your table view expandable just by implementing one method. -
SwiftyComments
UITableView based component designed to display a hierarchy of expandable/foldable comments. -
AEAccordion
Simple and lightweight UITableViewController with accordion effect (expand / collapse cells) -
SectionScrubber
A component to quickly scroll between collection view sections -
SelectionList
Simple single-selection or multiple-selection checklist, based on UITableView -
SPDiffable
Wrapper of Apple Diffable Data Source. Including side bar and ready-use models. -
AZTableViewController
Elegant and easy way to integrate pagination with dummy views -
OKTableViewLiaison
Framework to help you better manage UITableViews -
CollapsibleTable
Collapsable table view sections with custom section header views. -
FDTextFieldTableViewCell
A UITableViewCell with an editable text field -
Doppelganger-Swift
Array diffs as collection view wants it - now in Swift ✨ -
CKTextFieldTableCell
UITableViewCell drop-in replacement with support of UITextField
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of WLEmptyState or a related project?
README
Table of Content <!-- omit in toc -->
- Overview
- Running an Example Project
- Customizing WLEmptyState
- Contributing to WLEmptyState
- Author
- License
Overview
WLEmptyState is an iOS based component that lets you customize the message when the dataset of UITableView
or UICollectionView
is empty. We created a sample project with the WLEmptyState component to show how you can use it.
Running an Example Project
To run the Example
project:
Clone the repo with the following command:
git clone [email protected]:wizeline/WLEmptyState.git
Move to the
Example
directory and run the following command:pod install
Installing WLEmptyState
CocoaPods
WLEmptyState is available through CocoaPods. To install it, add the following command to your Podfile:
pod 'WLEmptyState'
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate WLEmptyState into your Xcode project using Carthage, specify it in your Cartfile:
github "wizeline/WLEmptyState"
Configuring WLEmptyState
The WLEmptyState component uses Method Swizzling. Therefore, to configure WLEmptyState
, follow these steps:
Import the module in the
AppDelegate
class by addingimport WLEmptyState
.Call the static method
configure()
onapplication(_ application:, didFinishLaunchingWithOptions:)
method.Your
AppDelegate
class should look like this:import WLEmptyState ... func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { WLEmptyState.configure() return true }
Using WLEmptyState
Once you have configured WLEmptyState
, you can use it for your UITableViewController
or UICollectionViewController
. You need to conform the WLEmptyStateDataSource
protocol. For example,
class YourTableViewController: UITableViewController, WLEmptyStateDataSource {
override func viewDidLoad() {
super.viewDidLoad()
tableView.emptyStateDataSource = self
}
}
After you run your project with an empty dataset for your entity, you'll be able to see a default WLEmptyState
view.
Default Image
Customizing Default WLEmptyState
If you want to customize the text, description, or image, of the default component you need to implement the WLEmptyStateDataSource
function. You can find the code for customization in the following list:
- Customize Image
func imageForEmptyDataSet() -> UIImage? {
return UIImage(named: "bubble_icon")
}
- Customize Title
func titleForEmptyDataSet() -> NSAttributedString {
let title = NSAttributedString(string: "No messages", attributes: [NSAttributedString.Key.font: UIFont.preferredFont(forTextStyle: .headline)])
return title
}
- Customize Description
func descriptionForEmptyDataSet() -> NSAttributedString {
let title = NSAttributedString(string: "There's no messages to show.", attributes: [NSAttributedString.Key.font: UIFont.preferredFont(forTextStyle: .caption1)])
return title
}
Customized Image
Creating your own EmptyState
Using customViewForEmptyState()
allows you to provide your own implementation for Empty State.
func customViewForEmptyState() -> UIView? {
let activityIndicatorView = UIActivityIndicatorView()
activityIndicatorView.startAnimating()
activityIndicatorView.color = .purple
return activityIndicatorView
}
Disable scroll
You can disable the scroll when the Empty State is showing. You only need to conform the WLEmptyStateDelegate
protocol and return false
in the enableScrollForEmptyState()
function:
// Conform the WLEmptyStateDelegate protocol
class YourTableViewController: UITableViewController, WLEmptyStateDataSource, WLEmptyStateDelegate {
override func viewDidLoad() {
super.viewDidLoad()
tableView.emptyStateDataSource = self
tableView.emptyStateDelegate = self // Set your delegate
}
func enableScrollForEmptyState() -> Bool {
// To enable/disable the scroll return true or false
return false
}
}
Contributing to WLEmptyState
We actively welcome your pull requests. We are trying to make contributions to this project as transparent and accessible as possible, please read our [Contributing guidelines](contributing.md) and follow the [Code of conduct](CODE_OF_CONDUCT.md). If you face any problem with the code, please open an issue on GitHub.
List of Contributors. ⭐️
License
WLEmptyState is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the WLEmptyState README section above
are relevant to that project's source code only.