I have a complex autolayout which needs to adapt to rotation by removing old constraints and adding new ones.
I have a grid layout of views inside a containerView
.
The problem is when I call
[UIView animateWithDuration:0.4 animations:^{
[self.containerView layoutIfNeeded];
}];
The views always animate from the position [0,0] to their new position. What I would prefer is that the views would move from their old position (before I remove the constraints) to the new positions (after removal and addition of the new constraints)
Has someone been able to achieve this?