iOS: TableView如何刷新指定的cell 或section

it2022-05-10  63

/一个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]; 

转载于:https://www.cnblogs.com/zhaoweizheng/p/4750508.html

相关资源:数据结构—成绩单生成器

最新回复(0)