iOS - UIRefreshControl

UIRefreshControl:UIControl (UIControl:UIView)

  

使用一:

  UITableView之Cell刷新,UIRefreshControl为其一属性.

     self.customTableView.refreshControl = [[UIRefreshControl alloc] init];

     [self.customTableView.refreshControl addTarget:self action:@selector(doRefresh:)    forControlEvents:UIControlEventValueChanged];    

}

- (void)doRefresh:(UIRefreshControl *)sender {

 

    NSLog(@"refreshing");

    [self.customTableView.refreshControl performSelector:@selector(endRefreshing) withObject:nil afterDelay:1.0];

}

 

posted @ 2017-02-21 22:05  Wind678  阅读(174)  评论(0编辑  收藏  举报