这里用到的是UIRefreshControl(这是系统自带的下拉刷新,使用非常方便)
效果图
代码实现
//系统自带的下拉刷新效果
UIRefreshControl *control = [[UIRefreshControl alloc] init];
[control addTarget:self action:@selector(reFreshstatus:) forControlEvents:UIControlEventValueChanged];
//不用自定义frame
[self.tableView addSubview:control];
//一进来就有刷新效果(但刷新数据是要手动的)
[control beginRefreshing];
[self reFreshstatus<