1。位于table view的顶端,下拉可刷新。只能是在UITableViewController环境中可用
2。初始化
self.refreshControl = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self action:@selector(handleRefresh:) forControlEvents:UIControlEventValueChanged];
3。执行刷新
- (void) handleRefresh:(id)paramSender{
。。。//重新获取已更改的数据源
[self.refreshControl endRefreshing]; //结束刷新,即隐藏刷新控件
。。。//重新加载表
}
4。属性
attributedTitle : 刷新中显示的文本
tintColor:刷新控件的颜色