博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
iOS之UITableView(二)系统自带的刷新UIrefreshControl
阅读量:4289 次
发布时间:2019-05-27

本文共 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/

你可能感兴趣的文章
文字常量区与栈
查看>>
非阻塞connect 编写方法
查看>>
epoll 边沿触发
查看>>
String类 默认生成的函数
查看>>
Linux 软连接与硬链接
查看>>
视音频数据处理入门:H.264视频码流解析
查看>>
视音频数据处理入门:AAC音频码流解析
查看>>
视音频数据处理入门:UDP-RTP协议解析
查看>>
视音频数据处理入门:FLV封装格式解析
查看>>
最简单的基于FFMPEG的封装格式转换器(无编解码)
查看>>
base64 编码原理
查看>>
单链表是否有环的问题
查看>>
判断两个链表是否相交并找出交点
查看>>
归并排序
查看>>
STL常见问题
查看>>
time_wait和close_wait状态
查看>>
STL中vector、list、deque和map的区别
查看>>
Linux下多线程查看工具(pstree、ps、pstack)
查看>>
PID PPID LWP NLWP
查看>>
查看线程CPU占用情况
查看>>