TableView如何刷新指定的cell 或section和滚动到制定位置
2015-12-23 11:20
603 查看
//一个section刷新
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
//一个cell刷新
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
//
滚动到制定位置
[self.matchListTableView reloadData];
NSIndexPath * dayOne = [NSIndexPath indexPathForRow:0 inSection:2];
[self.matchListTableView scrollToRowAtIndexPath:dayOne atScrollPosition:UITableViewScrollPositionTop animated:YES];
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
//一个cell刷新
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
//
滚动到制定位置
[self.matchListTableView reloadData];
NSIndexPath * dayOne = [NSIndexPath indexPathForRow:0 inSection:2];
[self.matchListTableView scrollToRowAtIndexPath:dayOne atScrollPosition:UITableViewScrollPositionTop animated:YES];
相关文章推荐
- Objective C类方法load和initialize的区别
- Bug之解决Xcode 7编译错误:* does not contain bitcode.
- Netty实现原理浅析
- Android小技巧:动态设置布局属性addRule
- ubuntu 安装 tomcat7
- PCL—低层次视觉—关键点检测(iss&Trajkovic)
- [Web前端]梳理-DOM.16. event对象
- 程序运行前退出前动画
- 自己动手整合ssh
- redis主从配置及主从切换
- 微信SDK导入到Xcode中编译错误
- 搜索栏UISearchBar和UISearchController
- DialogFragment实现自定义进度条
- linux 命令之 getfacl
- jdk+tomcat
- javascript数据类型(一)
- 项目中phpexcel的基本用法
- Ubuntu -- 安装、卸载程序的命令
- Java下的框架编程--cglib的应用
- 网络爬虫——爬取糗事百科笑料段子