In my app, I was using tableview.begingUpdates()
to animate the change of my tableviewcell
heigh (expansion and collision of an image). It was working tip-top on iOS 8.0-9.3. After iOS10.0 it stopped working for an unknown reason. Is anybody facing this issue 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];
}