码迷,mamicode.com
首页 > 移动开发 > 详细

IOS6.0自带下拉刷新控件UIRefreshControl

时间:2015-06-05 22:48:41      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:下拉刷新   uirefreshcontrol   

1.UIRefreshControl必须要在IOS6.0以后才能使用,同时他只能在UITableViewController类中才可以使用

技术分享技术分享

2.使用比较简单

    self.refreshControl = [[UIRefreshControl alloc]initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 100)];
    [self.refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
    [self.tableView.tableHeaderView addSubview:self.refreshControl];


3.下拉之后refreshControl会一直显示,直到调用[self.refreshControl endRefreshing];


按照惯例还是附上demo

http://pan.baidu.com/s/1kTEbUmF


IOS6.0自带下拉刷新控件UIRefreshControl

标签:下拉刷新   uirefreshcontrol   

原文地址:http://blog.csdn.net/nlyellow/article/details/46380725

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!