首页 > 移动平台 > 详细

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

时间:2018-05-28 15:38:31      阅读:202      评论:0      收藏:0      [点我收藏+]

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

//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刷新某一个区和某一行

原文:https://www.cnblogs.com/hero11223/p/9100322.html

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