简介
我们往往会使用列表组件(UITableView or UICollectionView) 来展示App内容。但是,这些组件在数据为空的时候有可能会出现空白页,特别当新账号用户,网络异常或者App出现bug。为了让用户清楚了解空白页的原因,开发者很有必要对那些常由异常造成的空白页,给出温馨提示和引导视图。
安装
- Add
pod 'TBScrollViewEmpty'
to your Podfile. - Run
pod install
orpod update
. #import <TBScrollViewEmpty.h>
特性
- 自动化: 自动添加或移除提示视图.
- 结构: 该框架可以使你快速自定义视图.
- 网络: 监听网络状态变化.
- NSAttributedString: 使用NSAttributedString可以更加快速建立视图表达.
Demo
如何用
-
#import <TBScrollViewEmpty.h>
,框架会在数据为空的时候自动帮添加或者移除提示视图。 - 你无须遵循本框架的代理,除非你需要自定义视图开发。
授权
TBScrollViewEmpty完全公开源代码给开发者使用。
使用TBScrollViewEmpty应遵守MIT协议. 详情见协议文件。
Company and Organization
@Shanghai,HC @Shanghai,HK @Shanghai,SW
Github和源码
英文
What
Typically we use list component (UITableView or UICollectionView) to show App content. However, these components may display blank when the data is empty, specially for new users with accounts, the network is not reachable or something wrong with our app. To let the users konw what is going on when the blank page comes out, it’s necessary for empty states to be dealt with by developers as blank pages often caused by exceptions.
Installation
- Add
pod 'TBScrollViewEmpty'
to your Podfile. - Run
pod install
orpod update
. #import <TBScrollViewEmpty.h>
Feature
- Automatic: Automatically add or remove the tip view.
- Structure: This framework allows you customized development easily.
-
Network:
Monitor the status of network.
- NSAttributedString: Uses NSAttributedString for easier appearance customisation.
Demo
How to use
-
#import <TBScrollViewEmpty.h>
, then this framework will show standard emptyView automatically when the data is empty. - You don't even need to conform to delegate, unless you want to customize development.
License
TBScrollViewEmpty is provided under the MIT license. See LICENSE file for details.
Company and Organization
@Shanghai,HC @Shanghai,HK @Shanghai,SW