OnceLoadingView
安装
CocoaPods
在 Podfile 中添加 pod 'OnceLoadingView'
。 执行 pod install
或 pod update
。 导入 <OnceLoadingView.h>
。
手动安装
1.下载 OnceLoadingView 文件夹中的所有内容。
2.将 OnceLoadingView 内的 OnceLoadingView.h/.m 源文件添加(拖放)到你的工程。
##使用
[OnceLoadingView showNoNetwork:self.view];
####模拟加载
[OnceLoadingView showLoadingFailed:self.view event:^(UIButton *sender) {
[OnceLoadingView showLoading:self.view];
}];
//数据加载完成后消失
[self performSelector:@selector(dis) withObject:self afterDelay:4];
-(void)dis{
需要执行的操作
}
####模拟加载失败,重新加载回调
[OnceLoadingView showNullWithinView:self.view];
####模拟数据没找得到
[OnceLoadingView showNoNetwork:self.view];
####模拟无网络
系统要求
许可证
OnceKit 采用 MIT 许可证,详细信息请见 LICENSE 文件。