In UITableView
I can scroll down to see more of the bottom cells. And of course the top most cells get out of the screen. Then I remove a cell with tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Top)
. The remaining cells move smoothly to fill the gap of a deleted cell. This works until I add automatic dimensions for row height.
But when I set automatic dimensions for row height and delete the bottom cell the remaining cells slide down instantly to fill the gap. Without animation. I guess it's related to setting automatic dimensions, as without it the cells move smoothly.
How to make the cells slide down smoothly even when I use automatic dimension?
In viewDidLoad()
I set up automatic row dimension with these lines:
tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 100
And this is how I remove a cell:
tableView.beginUpdates()
tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Top)
tableView.endUpdates()