本文共 595 字,大约阅读时间需要 1 分钟。
- (void)creatRefreshing {
self.refreshControl = [[UIRefreshControlalloc] init];
// [self.tb addSubview:self.refreshControl];//可以不加这句话,系统自动管理UIRefreshControl,自动添加到tableview视图中;
[selfsetRefreshControl:self.refreshControl];//tableviewcontroller控制器设置刷新控件 ,可以不设置
self.refreshControl.attributedTitle = [[NSAttributedStringalloc] initWithString:@"努力加载中……"];
self.refreshControl.tintColor = [UIColorblueColor];//小菊花颜色
[self.refreshControladdTarget:selfaction:@selector(refreshAction)forControlEvents:UIControlEventValueChanged];
}
- (void)refreshAction{
// 结束刷新
// [self.refreshControl endRefreshing];
}
转载地址:http://vfmgi.baihongyu.com/