您的位置:首页 > 产品设计 > UI/UE

刷新某一行或某一段

2016-06-29 09:43 357 查看
tableView 刷新某一行或某一段

//一个section刷新
NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndex:1];
[self.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];

//一个cell刷新
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:1 inSection:0];
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];


注意:不分段的话写 0,要不然找不到,报错,而且还不好找。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息