一个很常见的需求就是在一个cell上点赞,评论等操作时,需要刷新单个cell对象,常用的方法即为: [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects...方法1:(支持iOS7+) [UIView performWithoutAnimation:^{ [self.tableView reloadRowsAtIndexPaths...setAnimationsEnabled:NO]; [self.tableView performBatchUpdates:^{ [self.tableView reloadRowsAtIndexPaths
内部高度改变然后影响到tableView,不能直接修改内部View约束来影响, 需要通过setupAutoHeightWithBottomView来动态刷新tableView,如果在cell中,还需要reloadRowsAtIndexPaths...进行刷新 //cellbtnAction [self.sd_tableView reloadRowsAtIndexPaths:@[self.sd_indexPath] withRowAnimation:
[reloadRows addObject:[NSIndexPath indexPathForRow:i inSection:0]]; } [self.tableView reloadRowsAtIndexPaths...[reloadRows addObject:[NSIndexPath indexPathForRow:i inSection:0]]; } [self.tableView reloadRowsAtIndexPaths...indexPathForRow:i inSection:0]]; }else{ break; } } [self.tableView reloadRowsAtIndexPaths
// 刷新某一行 NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:1]; [self.tableView reloadRowsAtIndexPaths
deleteRowsAtIndexPaths:@[path] withRowAnimation:UITableViewRowAnimationRight]; // 局部刷新指定的行 [tableView reloadRowsAtIndexPaths
indexPath.row] = self.textView.text; // [cell setContent:self.textView.text]; [self.tableView reloadRowsAtIndexPaths
NSIndexPath indexPathForRow:row inSection:0]; NSArray *indexPaths = @[indexPath]; [_tableView reloadRowsAtIndexPaths
deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation; 重载一些行 - (void)reloadRowsAtIndexPaths
weakSelf.longitude2 = lat; [_tableView reloadRowsAtIndexPaths
//标记消息已读 [weakSelf requestToReadedMessageWithTag:sender.tag]; //刷新当前cell [tableView reloadRowsAtIndexPaths...cell.btnClickedBlock = ^{ //标记消息已读 [weakSelf requestToReadedMessageWithTag:nil]; //刷新当前cell [tableView reloadRowsAtIndexPaths
if(indexPaths){ dispatch_async(dispatch_get_main_queue(), ^{ [self.tableView reloadRowsAtIndexPaths
isOpen = YES; } //记下选中的索引 self.selectedIndex = indexPath; //刷新 [tableView reloadRowsAtIndexPaths
下次来到这里,currentIndex指的就是上一句 self.currentIndex = i; [self.tableView reloadRowsAtIndexPaths
case NSFetchedResultsChangeUpdate: //让tableView刷新indexPath位置上的cell [tableView reloadRowsAtIndexPaths
:0] withRowAnimation:UITableViewRowAnimationAutomatic]; [tableView reloadRowsAtIndexPaths
领取专属 10元无门槛券
手把手带您无忧上云