美文网首页
iOS tableView刷新section或指定的一个cell

iOS tableView刷新section或指定的一个cell

作者: frola_ | 来源:发表于2018-12-05 14:56 被阅读0次

UITableview 刷新某一个cell 或 section

刷新Section

//刷新Section
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2]; 
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic]; 

刷新一个cell

//刷新一个cell
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0]; 
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];

相关文章

网友评论

      本文标题:iOS tableView刷新section或指定的一个cell

      本文链接:https://www.haomeiwen.com/subject/tbxwcqtx.html