iOS UITableView 局部刷新

来源:互联网 发布:广西网络教育 编辑:程序博客网 时间:2024/04/30 04:46
---------直接代码说话:

  //局部section刷新

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

   [tview reloadSections:nd withRowAnimation:UITableViewRowAnimationAutomatic];

   //局部cell刷新

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

   [tableViewreloadRowsAtIndexPaths:[NSArray arrayWithObjects:te,nil]withRowAnimation:UITableViewRowAnimationMiddle];

0 0