You want to use the CAAnimationGroup class. Create an array containing the desired animations, and set the AnimationGroup animations property for this array. CAAnimationGroup is a subclass of CAAnimation, so you can add it to a layer using [layer addAnimation:forKey:] , as you would for a normal animation. After adding to a layer, all animations in the group are performed simultaneously.
I would suggest reading the CAAnimationGroup Reference first . Before using it, you need to know a number of implementation details. For instance:
- The
delegate property of individual animations is ignored. - The
removeOnCompletion property of individual animations is ignored. - AnimationGroup has its own
delegate and removeOnCompletion . - An animation is not time bound to a group, therefore, if an individual animation has a duration longer than that of a group object, it will be interrupted at the end of the group duration.
- The
animations property of the CAAnimationGroup file is copied, not saved.
source share