zl程序教程

您现在的位置是:首页 >  其它

当前栏目

UITableView 刷新指定行

指定 刷新
2023-06-13 09:17:16 时间

// 一个section刷新

NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndex:1]; 

[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];  

//collection 相同

// 刷新某一行

  NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:1];

  [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; 

//collection 相同