首页 > 移动平台 > 详细

IOS UITableView reload 刷新某一个cell 或 section

时间:2015-01-05 12:51:03      阅读:1397      评论:0      收藏:0      [点我收藏+]

通常刷新整个列表 我们都使用[self.tableView reloadData];

有的时候,有变化更新的只是某一行 row 或者是某个section 所以只更新这一行就好了

//一个section刷新
int section_index=10;//更新第11个sectioin
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:section_index] withRowAnimation:UITableViewRowAnimationNone];
//一个cell刷新    
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];  //更新 第一个section的第4行  
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];  

 

IOS UITableView reload 刷新某一个cell 或 section

原文:http://www.cnblogs.com/someonelikeyou/p/4203171.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!