美文网首页
iOS tableView 刷新某个section或某个cell

iOS tableView 刷新某个section或某个cell

作者: 木登与木由 | 来源:发表于2018-07-03 17:08 被阅读23次

1、刷新某个section

NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:sectionIndex];    
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];  

2、刷新某个cell

NSIndexPath *indexPath=[NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex];    
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];

相关文章

网友评论

      本文标题:iOS tableView 刷新某个section或某个cell

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