If there are two animations happens in sequence, I would like to remove the first animation, and start the second animation from the current position. I used [layer removeAllAnimations] to cancel the first animation before adding the second animation to the layer, the layer always goes back to the initial position. I know it's the default action of removeAllAnimations, but I would like to know if there's any way you can set the layer to stay the current position. Thank you very much.
Update -- I got this done by getting the presentationLayer position and assign it to the model layer position. And I also used - (void)animationDidStop:(UIAnimation*)animation finished:(BOOL)flag; to check if the animation finishes.
You could use: myView.frame = [[myView.layer presentationLayer] frame]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With