局部刷新UITableView

来源:互联网 发布:淘宝网丝带 编辑:程序博客网 时间:2024/04/30 07:39

刷新表 

 [self.tableView relodata];


局部section刷新

NSIndexSet * nd=[[NSIndexSet alloc]initWithIndex:0];//刷新第1个section

[self.tableView reloadSections:nd withRowAnimation:
UITableViewRowAnimationAutomatic];
 

局部cell刷新

 NSIndexPath *te=[NSIndexPath indexPathForRow:1 inSection:0];//刷新第一个section的第1行

 [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:te,nil] withRowAnimation:UITableViewRowAnimationMiddle];


转自:http://blog.csdn.net/yisibugua0627/article/details/9280113