[iOS]tableView 一些技巧
2016-07-13 00:00
197 查看
//去掉多余的cell
self.contactsTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
//tableView出现的时候,清除选中状态
如果是tableViewController
self.clearsSelectionOnViewWillAppear = YES;
如果是viewController,在viewWillAppear方法里添加
[self.tableView deselectRowAtIndexPath:[self.contactsTableView indexPathForSelectedRow] animated:YES];
self.contactsTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
//tableView出现的时候,清除选中状态
如果是tableViewController
self.clearsSelectionOnViewWillAppear = YES;
如果是viewController,在viewWillAppear方法里添加
[self.tableView deselectRowAtIndexPath:[self.contactsTableView indexPathForSelectedRow] animated:YES];
相关文章推荐
- 李洪强iOS开发之OC[017]函数和方法的区别
- iOS开发-推送-第三方推送前期准备工作
- iOS学习(三十三)使用NSUserDefaults简单的登陆界面保存用户名,下次启动并显示出来
- ios 横分割线 纵分割线
- ios打包错误排除
- iOS流媒体开发之二:滑动手势控制音量、亮度和进度
- iOS流媒体开发之一:总结系统提供的接口
- iOS学习(三十二)简单的登陆界面保存用户名到home,下次启动并显示出来
- iOS开发An unknown error occurred.真机调试
- iOS 使用NSUserDefaults存取头像
- iOS单例模式
- iOS学习(三十一)IOS中获取home文件的目录,分别保存字符串,数组,字典
- iOS学习笔记--如何用ssh key 配置Github
- AVAudioRecord录音的使用
- iOS 【Third-SDWebImage基本使用】
- IOS进阶 - CALayer的子类
- ios developer tiny share-20160712
- ios developer tiny share-20160712
- iostat命令使用指南
- iOS工程师必须知道的三点