iOS 深度好文

IOS TableView更新某一组某一行

2016-07-19  本文已影响1111人  念念不忘的旧时光

//一个section刷新

NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:1]; //你需要更新的组数

[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];  //collection 相同

//一个cell刷新

NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];  //你需要更新的组数中的cell

[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];//collection 相同

上一篇 下一篇

猜你喜欢

热点阅读