YWLoadingView
它支持 UICollectionView,UITableView,UIScrollView,UIView
示例
要运行示例项目,请克隆仓库,首先从 Example 目录运行 pod install
-
import UIView+YWLoadView
开始加载,设置
[self.view ex_updateLoadingState:YWLoadState_Loading];
或者
[self.scrollView ex_updateLoadingState:YWLoadState_Loading];
或者
[self.table ex_updateLoadingState:YWLoadState_Loading];
或者
[self.collection ex_updateLoadingState:YWLoadState_Loading];结束加载,设置
YWLoadState_NoData = 1, // 服务器无数据
YWLoadState_Failed = 2, // 加载失败
YWLoadState_UnLogin = 3, // 需要登录
YWLoadState_NoNetWork = 4, // 网络限制
YWLoadState_Finish = 5, // 加载完成 -
如果您想捕获点击事件
- self.view.loadingActionTarget = self;
- 实现 YWLoadActionDelegate 方法
- (void)clickLoadUnloginView:(id)unloginView
- (void)clickNoNetWorkView:(id)noNetWorkView
- (void)clickLoadNodataView:(id)nodataView
- (void)clickLoadFailedView:(id)failedView