<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAAnimationGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAAnimationGroup"
  },
  "title" : "CAAnimationGroup"
}
-->

# CAAnimationGroup

An object that allows multiple animations to be grouped and run concurrently.

```
class CAAnimationGroup
```

## Overview

The grouped animations run in the time space specified by the [`CAAnimationGroup`](/documentation/QuartzCore/CAAnimationGroup) instance.

The duration of the grouped animations are not scaled to the duration of their [`CAAnimationGroup`](/documentation/QuartzCore/CAAnimationGroup). 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.

The following code 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.

```swift
let fadeOut = CABasicAnimation(keyPath: "opacity")
fadeOut.fromValue = 1
fadeOut.toValue = 0
fadeOut.duration = 1
     
let expandScale = CABasicAnimation()
expandScale.keyPath = "transform"
expandScale.valueFunction = CAValueFunction(name: kCAValueFunctionScale)
expandScale.fromValue = [1, 1, 1]
expandScale.toValue = [3, 3, 3]
     
let fadeAndScale = CAAnimationGroup()
fadeAndScale.animations = [fadeOut, expandScale]
fadeAndScale.duration = 1
```

> Important:
> The ``doc://com.apple.quartzcore/documentation/QuartzCore/CAAnimation/delegate`` and ``doc://com.apple.quartzcore/documentation/QuartzCore/CAAnimation/isRemovedOnCompletion`` properties of animations in the ``doc://com.apple.quartzcore/documentation/QuartzCore/CAAnimationGroup/animations`` array are currently ignored. The ``doc://com.apple.quartzcore/documentation/QuartzCore/CAAnimationGroup`` delegate does receive these messages.

## Topics

### Grouped animations

[`animations`](/documentation/QuartzCore/CAAnimationGroup/animations)

An array of `CAAnimation` objects to be evaluated in the time space of the receiver.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CAMediaTiming`](/documentation/QuartzCore/CAMediaTiming)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CAAction`](/documentation/QuartzCore/CAAction)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`CAAnimation`](/documentation/QuartzCore/CAAnimation)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)