HBEmptyView
用 Swift 编写的,用于在 UITableView 和 UICollectionView 没有数据时显示占位。
主要 API 如下:
extension UIScrollView {
/// 无数据占位图
open var emptyView: UIView? { get set }
/// 是否需要展示占位图,不设置则默认展示,在 TableView 和 CollectionView 中和无数据关联
open var isShowEmptyView: (() -> Bool)? { get set }
}
extension UITableView {
/// 刷新占位图
open func reloadEmptyView()
}
extension UICollectionView {
/// 刷新占位图
open func reloadEmptyView()
}