ios/swift UITableview 刷新某一个cell 或 section
2016-03-30 18:35
369 查看
//一个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];
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];
相关文章推荐
- swift学习笔记之数据持久化(属性列表)
- Swift 初见(A Swift Tour)
- swift开发笔记27 一个错误
- Swift闭包表达式
- Swift-图片无限循环轮播
- Swift自定义Class实现Hashable
- SWIFT遇到的坑--------持续更新中
- iOS Swift和OC混编
- NSStringTransform常量
- IOS开发Swift键盘收起,键盘挡住输入模框的处理
- Swift 性能探索和优化分析
- Swift 性能探索和优化分析
- Swift 2.2 协议和代理
- IOS-swift-fmdb错误
- swift管理第三方框架
- swift 的基本类型之字符串
- Swift编程基础(一):常量与变量
- Swift 2.0 裁剪字符串以及Int和String转化
- swift开发笔记26 使用xib自定义相机界面
- Swift 学习记录(1)