UITableView--刷新

//刷新表格3种形式

//1.全部刷新刷新整个表

[table reloadData];

//2.局部刷新Sections:要刷新的区索引的集合

NSIndexSet *set = [NSIndexSet indexSetWithIndex:btn.tag-100];

//局部刷新区(NSIndexSet *)sections要刷新的区索引的集合

[table reloadSections:set withRowAnimation:UITableViewRowAnimationFade];

//3.局部刷新行(row)

  NSIndexPath * path = [NSIndexPath indexPathForRow:2 inSection:0];

  NSArray * array = @[path];

  [table reloadRowsAtIndexPaths:array withRowAnimation:UITableViewRowAnimationFade];

你可能感兴趣的:(UITableView--刷新)