---
title: CAAnimation
framework: quartzcore
role: symbol
role_heading: Class
path: quartzcore/caanimation
---

# CAAnimation

The abstract superclass for animations in Core Animation.

## Declaration

```swift
class CAAnimation
```

## Mentioned in

Optimizing iPhone and iPad apps to support ProMotion displays

## Overview

Overview CAAnimation provides the basic support for the CAMediaTiming and CAAction protocols. You do not create instance of CAAnimation: to animate Core Animation layers or SceneKit objects, create instances of the concrete subclasses CABasicAnimation, CAKeyframeAnimation, CAAnimationGroup, or CATransition. Animating Core Animation Layers You can animate the contents of your iOS or macOS app’s user interface by attaching animations to CALayer objects. For more information, see Core Animation Programming Guide. 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 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 SCNAnimatable protocol, including nodes, geometries, and materials. In a Scene Kit app, 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

- [init(SCNAnimation:)](quartzcore/caanimation/init(scnanimation:).md)

### Animation Attributes

- [isRemovedOnCompletion](quartzcore/caanimation/isremovedoncompletion.md)
- [timingFunction](quartzcore/caanimation/timingfunction.md)

### Providing Default Values

- [defaultValue(forKey:)](quartzcore/caanimation/defaultvalue(forkey:).md)

### Designating a Delegate

- [delegate](quartzcore/caanimation/delegate.md)

### Archiving Properties

- [shouldArchiveValue(forKey:)](quartzcore/caanimation/shouldarchivevalue(forkey:).md)

### Controlling SceneKit Animation Timing

- [usesSceneTimeBase](quartzcore/caanimation/usesscenetimebase.md)

### Fading between SceneKit Animations

- [fadeInDuration](quartzcore/caanimation/fadeinduration.md)
- [fadeOutDuration](quartzcore/caanimation/fadeoutduration.md)

### Attaching SceneKit Animation Events

- [animationEvents](quartzcore/caanimation/animationevents.md)

### Initializers

- [init(SCNAnimation:)](quartzcore/caanimation/init(scnanimation:).md)
- [init(coder:)](quartzcore/caanimation/init(coder:).md)

### Instance Properties

- [preferredFrameRateRange](quartzcore/caanimation/preferredframeraterange.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [CAAnimationGroup](quartzcore/caanimationgroup.md)
- [CAPropertyAnimation](quartzcore/capropertyanimation.md)
- [CATransition](quartzcore/catransition.md)

### Conforms To

- [CAAction](quartzcore/caaction.md)
- [CAMediaTiming](quartzcore/camediatiming.md)
- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [SCNAnimationProtocol](scenekit/scnanimationprotocol.md)

## See Also

### Animation

- [CAAnimationDelegate](quartzcore/caanimationdelegate.md)
- [CAPropertyAnimation](quartzcore/capropertyanimation.md)
- [CABasicAnimation](quartzcore/cabasicanimation.md)
- [CAKeyframeAnimation](quartzcore/cakeyframeanimation.md)
- [CASpringAnimation](quartzcore/caspringanimation.md)
- [CATransition](quartzcore/catransition.md)
- [CAValueFunction](quartzcore/cavaluefunction.md)
