My UITableViewCell will animate it\'s height when recognizing a tap. In iOS 9 and below this animation is smooth and works without issues. In iOS 10 beta there\
Can't comment because of reputation but sam's solution worked for me on IOS 10.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
EWGDownloadTableViewCell *cell = (EWGDownloadTableViewCell *)[tableView cellForRowAtIndexPath:indexPath];
if (self.expandedRow == indexPath.row) {
self.expandedRow = -1;
[UIView animateWithDuration:0.3 animations:^{
cell.constraintToAnimate.constant = 51;
[tableView beginUpdates];
[tableView endUpdates];
[cell layoutIfNeeded];
} completion:nil];
} else {
self.expandedRow = indexPath.row;
[UIView animateWithDuration:0.3 animations:^{
cell.constraintToAnimate.constant = 100;
[tableView beginUpdates];
[tableView endUpdates];
[cell layoutIfNeeded];
} completion:nil];
} }
where constraintToAnimate is a height constraint on a subview added to the cells contentView.