Say I want to combine transform
CAKeyframeAnimation *animation = [CAKeyframeAnimation
animationWithKeyPath:@"transform"];
and opacity
CAKeyframeAnimation *animation = [CAKeyframeAnimation
animationWithKeyPath:@"opacity"];
into keyframe animation. How do I combine and specify transform/opacity values for each keyframe?
Create two animations just like you do, use the same keyTimes for both of them, and add them both to the layer with addAnimation:forKey:. It's that easy.
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