I am trying to simply animate a view from one position to a another, using the code below, but the animation is not smooth. There is a "pop" in the animation. It moves up quickly before moving down for example.
Can anyone let me know if there is something wrong with my setup?
[UIView animateWithDuration:0.2 animations:^{
[_label setTransform:CGAffineTransformMake(1, 0, 0, 1, 0, 88)];
transformState = 1;
}];
Thanks for reading!
If you have a minute please download this very simple test project, so you can easily see the issue, and if you do, thanks so much for taking the time.
Your view controller has autolayout turned on in your storyboard, and autolayout can interact with the transform in unexpected ways.
Either turn autolayout off, or consider using the autolayout constraints to do your animation.