# NoDataView **Repository Path**: huqs/NoDataView ## Basic Information - **Project Name**: NoDataView - **Description**: 超简单的空数据提示通用View!!!!! 什么,简单到不行了!!!真的超级简单的使用!!!其实有牛逼的空数据展示那种,应该都知道,但是使用上就是太过繁琐,需要实现很多,所以果断放弃!!!自己弄个超简单的超简单的! - **Primary Language**: Objective-C - **License**: Not specified - **Default Branch**: huqs - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-05-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LLNoDataView 超简单的空数据提示通用View!!!!! 什么,简单到不行了!!!真的超级简单的使用!!!其实有牛逼的空数据展示那种,应该都知道,但是使用上就是太过繁琐,需要实现很多,所以果断放弃!!!自己弄个超简单的超简单的! ## 支持哪些空数据的展示 * `UIScrollView`、`UITableView`、`UICollectionView`、`UIWebView` * 其实都是可以使用的,返回的只有一个自定义的View ## 如何使用LLNoDataView * 手动导入: * 将`LLNoDataView`文件夹中的所有文件拽入项目中 * 导入主头文件:`#import "LLNoDataView.h"` ## 允许点击的时候,设置协议回调 ```objc //请下载工程查看Demo使用 noDataView.delegate = self; //实例化一次 //没有数据 LLNoDataView *dataView = [[LLNoDataView alloc] initNoDataWithFrame:self.tableView.bounds description:@"没有数据" canTouch:YES]; dataView.delegate = self; self.tableView.tableHeaderView = dataView; //没有网络 LLNoDataView *dataView = [[LLNoDataView alloc] initNoInternetWithFrame:self.tableView.bounds description:@"网络连接失败" canTouch:YES]; dataView.delegate = self; self.tableView.tableHeaderView = dataView; //可视重新加载按钮 LLNoDataView *dataView = [[LLNoDataView alloc] initReloadBtnWithFrame:self.tableView.bounds LLNoDataViewType:LLNoInternet description:@"" reloadBtnTitle:@"重新加载"]; dataView.delegate = self; self.tableView.tableHeaderView = dataView; //实例一次,再次修改提示文本信息 dataView.tipLabel.text = @"没有搜索到\"LLNoDataView\"的数据"; //点击按钮回调 - (void)didTouchLLNoDataView{ } ``` ## 可视化重新加载按钮 ![(可视化重新加载按钮)](http://git.oschina.net/huqs/NoDataView/raw/huqs/Screen1_0.png?dir=0&filepath=Screen1_0.png&oid=adf0ceada03408de283ec24d4dde96f0afbb26da&sha=087939c8020147592622627d85946f8cdccf5ea1) ## 没有数据 ![(没有数据)](http://git.oschina.net/huqs/NoDataView/raw/huqs/Screen1_1.png?dir=0&filepath=Screen1_1.png&oid=8d4645b8f526ccd99067f40031fb6d157ca97443&sha=087939c8020147592622627d85946f8cdccf5ea1) ## 网络连接失败 ![(网络连接失败)](http://git.oschina.net/huqs/NoDataView/raw/huqs/Screen1_2.png?dir=0&filepath=Screen1_2.png&oid=8c4782d359b6dbe89ab92f0fb1c6a1b4bd41a1d3&sha=087939c8020147592622627d85946f8cdccf5ea1)