In my application, I used tableview.begingUpdates() to animate the change in my tableviewcell value (image extension and collision). It worked on top of iOS 8.0-9.3. After iOS10.0, it stopped working for an unknown reason. Is anyone facing this problem right now?
#pragma mark - Table view delegate - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return self.selectedIndexPath && self.selectedIndexPath.row == indexPath.row ? self.view.frame.size.height - self.navigationController.navigationBar.frame.size.height + 20 : UITableViewAutomaticDimension; }
Inside the didSelect method
if(shouldExpand){ [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ [self.tableView beginUpdates]; [self.tableView endUpdates]; } completion:nil]; } else{ [self.tableView beginUpdates]; [self.tableView endUpdates]; }
source share