ios开发之--tableview刷新某一个区和某一行

Posted 稻草人11223

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ios开发之--tableview刷新某一个区和某一行相关的知识,希望对你有一定的参考价值。

在开发中,有时候,我们不需要刷新整个表,只需要刷新局部数据即可,具体代码如下:

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

这里仅做记录!

以上是关于ios开发之--tableview刷新某一个区和某一行的主要内容,如果未能解决你的问题,请参考以下文章