<!--
{
  "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/CAAnimation",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAAnimation"
  },
  "title" : "CAAnimation"
}
-->

# CAAnimation

The abstract superclass for animations in Core Animation.

```
class CAAnimation
```

## Overview

`CAAnimation` provides the basic support for the [`CAMediaTiming`](/documentation/QuartzCore/CAMediaTiming) and [`CAAction`](/documentation/QuartzCore/CAAction) protocols. You do not create instance of [`CAAnimation`](/documentation/QuartzCore/CAAnimation): to animate Core Animation layers or SceneKit objects, create instances of the concrete subclasses [`CABasicAnimation`](/documentation/QuartzCore/CABasicAnimation), [`CAKeyframeAnimation`](/documentation/QuartzCore/CAKeyframeAnimation), [`CAAnimationGroup`](/documentation/QuartzCore/CAAnimationGroup), or [`CATransition`](/documentation/QuartzCore/CATransition).

### Animating Core Animation Layers

You can animate the contents of your iOS or macOS app’s user interface by attaching animations to [`CALayer`](/documentation/QuartzCore/CALayer) objects. For more information, see [Core Animation Programming Guide](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004514).

### Animating Scene Kit Content

In Scene Kit, animation objects represent not only property-based animations, but also animations of geometry data created with external 3D authoring tools and loaded from a scene file. You use the properties of the [`CAAnimation`](/documentation/QuartzCore/CAAnimation) object representing a geometry animation to control its timing, monitor its progress, and attach actions for Scene Kit to trigger during the animation. You can attach animations to Scene Kit objects that adopt the <doc://com.apple.documentation/documentation/SceneKit/SCNAnimatable> protocol, including nodes, geometries, and materials.

In a Scene Kit app, [`CAAnimation`](/documentation/QuartzCore/CAAnimation) objects support additional methods and properties, listed under Controlling SceneKit Animation Timing, Fading between SceneKit Animations, and Attaching SceneKit Animation Events.

## Topics

### Creating an Animation

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

Creates and returns a new `CAAnimation` instance.

[`init(SCNAnimation:)`](/documentation/QuartzCore/CAAnimation/init(SCNAnimation:))

Creates an animation from a SceneKit animation.

### Animation Attributes

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

Determines if the animation is removed from the target layer’s animations upon completion.

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

An optional timing function defining the pacing of the animation.

### Providing Default Values

[`defaultValue(forKey:)`](/documentation/QuartzCore/CAAnimation/defaultValue(forKey:))

Specifies the default value of the property with the specified key.

### Designating a Delegate

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

Specifies the receiver’s delegate object.

### Archiving Properties

[`shouldArchiveValue(forKey:)`](/documentation/QuartzCore/CAAnimation/shouldArchiveValue(forKey:))

Specifies whether the value of the property for a given key is archived.

### Controlling SceneKit Animation Timing

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

For animations attached to SceneKit objects, a Boolean value that determines whether the animation is evaluated using the scene time or the system time.

### Fading between SceneKit Animations

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

For animations attached to SceneKit objects, the duration for transitioning into the animation’s effect as it begins.

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

For animations attached to SceneKit objects, the duration for transitioning out of the animation’s effect as it ends.

### Attaching SceneKit Animation Events

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

For animations attached to SceneKit objects, a list of events attached to an animation.

### Initializers

[`init(SCNAnimation:)`](/documentation/QuartzCore/CAAnimation/init(SCNAnimation:))

Creates an animation from a SceneKit animation.

### Instance Properties

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



---

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)