[iOS]UITableView刷新
2015-09-24 15:57
435 查看
刷新整个tableView
刷新局部cell
局部刷新section
刷新动画
[self.tableView reloadData];
刷新局部cell
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationFade];
局部刷新section
NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndex:0]; [self.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationFade];
刷新动画
typedef NS_ENUM(NSInteger, UITableViewRowAnimation) { UITableViewRowAnimationFade, //淡入淡出 UITableViewRowAnimationRight, //从右滑入 // slide in from right (or out to right) UITableViewRowAnimationLeft, //从左滑入 UITableViewRowAnimationTop, //从上滑入 UITableViewRowAnimationBottom, //从下滑入 UITableViewRowAnimationNone, // available in iOS 3.0 UITableViewRowAnimationMiddle, // available in iOS 3.2. attempts to keep cell centered in the space it will/did occupy UITableViewRowAnimationAutomatic = 100 // available in iOS 5.0. chooses an appropriate animation style for you };
相关文章推荐
- Bluetooth协议栈
- easyui tab之自动生成带datagrid的Tab页
- <s:iterator> 属性 value var status 用法详解
- 自定义easy-ui validatebox 如maxLength()等等校验规则
- UILabel的行间距
- 【iOS界面开发】iOS下,UILabel自适应高度的方法
- getuid(),geteuid()
- PHP预定义超全局数组 $_POST 、$_REQUEST 讲解
- UI - UIViewController
- iOS开发之UI基础--tableView展示斐波那契数列(Fibonacci)
- UI - 简单封装视图
- php.ini 中local value和 master value
- UI - UITextFiledAndUIButton及应用的生命周期
- Java中实现Serializable接口为什么要声明serialVersionUID?
- UI - UIViewAndUILabel
- UVa 133 The Dole Queue
- Worst Performing Queries
- UIProgressView进度条方法总结
- 网页性能管理详解:浅谈chrome-Timeline及window.requestAnimationFrame()方法
- OpenStack: Perform Consistent Snapshots With Qemu Guest Agent