As you say in your answer, this is reproducible only in views created in a storyboard. Is auto layout enabled in the storyboard? If so, you should not be animating center
, and I would expect the behavior you are seeing if you were. When you create the views programmatically, if you are not setting translatesAutoresizingMaskIntoConstraints
to NO
, then your animations should work as expected when you animate center
.
The correct way to animate views that are managed by auto layout constraints is to update the constraints to represent the new layout and then, in a [UIView animateWith…]
block, call -layoutIfNeeded
on the appropriate view.