Core Animation

Render, compose, and animate visual elements.


Core Animation provides high frame rates and smooth animations without burdening the CPU and slowing down your app. Most of the work required to draw each frame of an animation is done for you. You configure a few animation parameters (such as the start and end points) and tell Core Animation to start. Core Animation does the rest, handing most of the work off to dedicated graphics hardware to accelerate rendering. For more details, see Core Animation Programming Guide.


Layer Basics

class CALayer

An object that manages image-based content and allows you to perform animations on that content

protocol CALayerDelegate

Methods your app can implement to respond to layer related events.

class CAConstraint

A representation of a single layout constraint between two layers.

protocol CALayoutManager

Methods that allow an object to manage the layout of a layer and its sublayers.

class CAConstraintLayoutManager

An object that provides a constraint-based layout manager.

protocol CAAction

An interface that allows objects to respond to actions triggered by a CALayer.

Text, Shapes, and Gradients

class CATextLayer

A layer that provides simple text layout and rendering of plain or attributed strings.

class CAShapeLayer

A layer that draws a cubic Bezier spline in its coordinate space.

class CAGradientLayer

A layer that draws a color gradient over its background color, filling the shape of the layer (including rounded corners)


class CAAnimation

The abstract superclass for Core Animation animations.

protocol CAAnimationDelegate

Methods your app can implement to respond when animations start and stop.

class CAPropertyAnimation

An abstract subclass of CAAnimation for creating animations that manipulate the value of layer properties.

class CABasicAnimation

An object that provides basic, single-keyframe animation capabilities for a layer property.

class CAKeyframeAnimation

An object that provides keyframe animation capabilities for a layer object.

class CASpringAnimation

An animation that applies a spring-like force to a layer's properties.

class CATransition

An object that provides an animated transition between a layer's states.

class CAValueFunction

An object that provides a flexible method of defining animated transformations.

Animation Groups

class CAAnimationGroup

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

class CATransaction

A mechanism for grouping multiple layer-tree operations into atomic updates to the render tree.

Animation Timing

func CACurrentMediaTime()

Returns the current absolute time, in seconds.

class CAMediaTimingFunction

A function that defines the pacing of an animation as a timing curve.

protocol CAMediaTiming

Methods that model a hierarchical timing system, allowing objects to map time between their parent and local time.

class CADisplayLink

A timer object that allows your application to synchronize its drawing to the refresh rate of the display.

Particle Systems

class CAEmitterLayer

A layer that emits, animates, and renders a particle system.

class CAEmitterCell

The definition of a particle emitted by a CAEmitterLayer.

Advanced Layer Options

class CAScrollLayer

A layer that displays scrollable content larger than its own bounds.

class CATiledLayer

A layer that provides a way to asynchronously provide tiles of the layer's content, potentially cached at multiple levels of detail.

class CATransformLayer

CATransformLayer objects are used to create true 3D layer hierarchies, rather than the flattened hierarchy rendering model used by other CALayer classes.

class CAReplicatorLayer

A layer that creates a specified number of copies of its sublayers (the source layer), each copy potentially having geometric, temporal, and color transformations applied to it.

Metal and OpenGL

class CAMetalLayer

A layer that manages a pool of Metal drawables.

protocol CAMetalDrawable

A displayable resource that can be rendered or written to by Metal.

class CAEAGLLayer

A layer that supports drawing OpenGL content in iOS and tvOS applications.

class CAOpenGLLayer

CAOpenGLLayer provides a layer suitable for rendering OpenGL content.

class CARenderer

A layer that allows an application to render a layer tree into a Core OpenGL (CGL) context.



Defines the standard transform matrix used throughout Core Animation.

Quartz Composer

class QCCompositionLayer

The QCCompositionLayer class loads, plays, and controls Quartz Composer compositions in a Core Animation layer hierarchy. The composition tracks the Core Animation layer time and is rendered directly at the current dimensions of the QCCompositionLayer object.

See Also