Last Updated: February 25, 2016
·
1.316K
· lukerhodes

UITableViewCell animation when cancelling delete

There's a bug in iOS whereby if you have a UITableViewCell without an accessory view, entering editing mode (or swiping to delete) will animate without issue however when it comes to cancelling, there's no animation.

The solution is to set the accessoryView property:

cell.accessoryView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 1.0f, 1.0f)];
cell.accessoryView.backgroundColor = [UIColor clearColor];