We noticed a bug in our animations on the iOS 10 betas within
UITableView
cells: The cell's frame is animating, but the contentView
's frame is immediately jumping to the new position.This happens in iOS 10 devices when building against the iOS 9 SDK using Xcode 7 - the animation is fine on iOS 9 devices.
Steps to reproduce
- Create a table view with
UITableViewAutomaticDimension
- Add a view to one of the cells with edge constraints
- Animate
change to the view withintrinsicContentSize
/animateWithDuration
layoutIfNeeded
- Animate the cell height change with
/beginUpdates
EndUpdates
Animation code
UIView.animateWithDuration(0.3) { viewToAnimate.setNeedsLayout() viewToAnimate.layoutIfNeeded() } self.tableView.beginUpdates() self.tableView.endUpdates()
I've opened a radar for this (27679031) but are there are any good workarounds / alternative ways to achieve this animation?