An object that allows multiple animations to be grouped and run concurrently.
- iOS 2.0+
- macOS 10.5+
- tvOS 9.0+
The grouped animations run in the time space specified by the
The duration of the grouped animations are not scaled to the duration of their
CAAnimation. Instead, the animations are clipped to the duration of the animation group. For example, a 10 second animation grouped within an animation group with a duration of 5 seconds displays only the first 5 seconds of the animation.
Listing 1 shows how you can create a grouped animation containing opacity and scale animations to fade out a layer while expanding it. The animation starts with an opacity of
1 and a scale of
1 on all axes. As the animation's scale increases to
(3, 3, 3), the opacity drops to
0 and the animated layer vanishes.