//一个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]; tableView局部刷新
最新推荐文章于 2020-12-24 10:29:57 发布
本文介绍了如何在iOS开发中使用UITableView时,针对不同的需求进行局部刷新的方法。包括如何通过NSIndexPath和NSIndexSet来精确地刷新某个section或者某个cell的内容,这对于提高用户体验和应用性能十分关键。
1320

被折叠的 条评论
为什么被折叠?



