Reputation: 45
I have a sequence of images that I would like to animate. I am using the CAKeyframeAnimation
class to run the animation. Here is the relevant part of the code:
[keyAnimation setValues:arrayOfImages];
[keyAnimation setCalculationMode:@"discrete"];
keyAnimation.fillMode = kCAFillModeForwards;
keyAnimation.removedOnCompletion = YES;
[keyAnimation setRepeatCount:2];
[keyAnimation setDuration:1.1];
[myLayer addAnimation:keyAnimation forKey:@"myanimation"];
This works fine. However, I need to also move this animation (sequence of images) from one point to another point (on the iphone screen).
I am able to move a static image using the the a CGMutablePathRef
path reference. But I can't seem to move an animation which utilizes a sequence of images. How do I do this?
Thanks
Upvotes: 0
Views: 436
Reputation: 34935
Isn't this what the CAAnimationGroup
is for? To make two animations on the same layer run at the same time?
Upvotes: 1