Framework

QuartzCore

Overview

This collection of documents provides the API reference for Core Animation. Core Animation provides animation and display hierarchy capabilities to applications. For more details, see Core Animation Programming Guide.

Symbols

Classes

CAAnimation

CAAnimation is an abstract animation class. It provides the basic support for the CAMediaTiming and CAAction protocols. To animate Core Animation layers or Scene Kit objects, create instances of the concrete subclasses CABasicAnimation, CAKeyframeAnimation, CAAnimationGroup, or CATransition.

CAAnimationGroup

CAAnimationGroup allows multiple animations to be grouped and run concurrently. The grouped animations run in the time space specified by the CAAnimationGroup instance.

CABasicAnimation

CABasicAnimation provides basic, single-keyframe animation capabilities for a layer property. You create an instance of CABasicAnimation using the inherited init(keyPath:) method, specifying the key path of the property to be animated in the render tree.

CAConstraint

CAConstraint represents a single layout constraint between two layers. Each CAConstraint instance encapsulates one geometry relationship between two layers on the same axis.

CAConstraintLayoutManager

The CAConstraintLayoutManager class provides a constraint-based layout manager. You use the shared instance of this object by assigning it to the layoutManager property of any layer objects to which you have added constraints. During a layout update, Core Animation uses the layout manager to update the size and position of the sublayers based on the registered set of constraints.

CADisplayLink

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

CAEAGLLayer

The CAEAGLLayer class supports drawing OpenGL content in iPhone applications. If you plan to use OpenGL for your rendering, use this class as the backing layer for your views by returning it from your view’s layerClass() class method. The returned CAEAGLLayer object is a wrapper for a Core Animation surface that is fully compatible with OpenGL ES function calls.

CAEmitterBehavior
CAEmitterCell

The CAEmitterCell class represents one source of particles being emitted by a CAEmitterLayer object. An emitter cell defines the direction and properties of the emitted particles. Emitter cells can have an array of sub-cells, which lets the particles themselves emit particles.

CAEmitterLayer

The CAEmitterLayer class provides a particle emitter system for Core Animation. The particles are defined by instances of CAEmitterCell.

CAGradientLayer

The CAGradientLayer class draws a color gradient over its background color, filling the shape of the layer (including rounded corners)

CAKeyframeAnimation

The CAKeyframeAnimation class provides keyframe animation capabilities for a layer object. You create an CAKeyframeAnimation object using the inherited init(keyPath:) method, specifying the key path of the property that you want to animate on the layer. You can then specify the keyframe values to use to control the timing and animation behavior.

CALayer

The CALayer class manages image-based content and allows you to perform animations on that content. Layers are often used to provide the backing store for views but can also be used without a view to display content. A layer’s main job is to manage the visual content that you provide but the layer itself has visual attributes that can be set, such as a background color, border, and shadow. In addition to managing visual content, the layer also maintains information about the geometry of its content (such as its position, size, and transform) that is used to present that content onscreen. Modifying the properties of the layer is how you initiate animations on the layer’s content or geometry. A layer object encapsulates the duration and pacing of a layer and its animations by adopting the CAMediaTiming protocol, which defines the layer’s timing information.

CAMediaTimingFunction

CAMediaTimingFunction represents one segment of a function that defines the pacing of an animation as a timing curve. The function maps an input time normalized to the range [0,1] to an output time also in the range [0,1].

CAMetalLayer

A CAMetalLayer object is a Core Animation layer that manages a pool of Metal textures for rendering its content using Metal. To use Metal for rendering in your app, use this class as the backing layer for a view by returning it from your view’s layerClass() class method. To render the layer’s content, use the nextDrawable() method to retrieve a texture, then use it as a render target in a Metal rendering pipeline. After rendering each frame, you present the new content for display with the present(_:) or present(_:atTime:) method of the command buffer you used for rendering.

CAOpenGLLayer

CAOpenGLLayer provides a layer suitable for rendering OpenGL content.

CAPropertyAnimation

CAPropertyAnimation is an abstract subclass of CAAnimation for creating animations that manipulate the value of layer properties. The property is specified using a key path that is relative to the layer using the animation.

CARemoteLayerClientCARemoteLayerServer
CARenderer

CARenderer allows an application to render a layer tree into a CGL context. For real-time output you should use an instance of NSView to host the layer-tree.

CAReplicatorLayer

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

CAScrollLayer

The CAScrollLayer class is a subclass of CALayer that simplifies displaying a portion of a layer. The extent of the scrollable area of the CAScrollLayer is defined by the layout of its sublayers. The visible portion of the layer content is set by specifying the origin as a point or a rectangular area of the contents to be displayed. CAScrollLayer does not provide keyboard or mouse event-handling, nor does it provide visible scrollers.

CAShapeLayer

The CAShapeLayer class draws a cubic Bezier spline in its coordinate space. The shape is composited between the layer's contents and its first sublayer.

CASpringAnimation
CATextLayer

The CATextLayer provides simple text layout and rendering of plain or attributed strings. The first line is aligned to the top of the layer.

CATiledLayer

CATiledLayer is a subclass of CALayer providing a way to asynchronously provide tiles of the layer's content, potentially cached at multiple levels of detail.

CATransaction

CATransaction is the Core Animation mechanism for batching multiple layer-tree operations into atomic updates to the render tree. Every modification to a layer tree must be part of a transaction. Nested transactions are supported.

CATransformLayer

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

CATransition

The CATransition class implements transition animations for a layer. You can specify the transition effect from a set of predefined transitions or by providing a custom CIFilter instance.

CAValueFunction

The CAValueFunction.h class provides a more flexible means of applying functions to property values during animation. A value function defines an optional transformation that is applied to the interpolated value before it is set in the presentation layer.

Protocols

CAAction

The CAAction protocol provides an interface that allows an object to respond to an action triggered by an CALayer. When queried with an action identifier (a key path, an external action name, or a predefined action identifier) the layer returns the appropriate action object–which must implement the CAAction protocol–and sends it a run(forKey:object:arguments:) message.

CAAnimationDelegateCALayerDelegate
CALayerDelegate

The CALayerDelegate informal protocol is implemented by the layer’s delegate to respond to layer-related events. You can implement the methods of this protocol to provide the layer’s content, handle the layout of sublayers, and provide custom animation actions to perform. The object that implements this protocol must be assigned to the delegate property of the layer object.

CALayoutManager
CAMediaTiming

The CAMediaTiming protocol models a hierarchical timing system, with each object describing the mapping of time values from the object's parent to local time.

CAMetalDrawable

The CAMetalDrawable protocol defines the interface for a display buffer associated with a CAMetalLayer object. Use the drawable object’s texture property to retrieve a texture object (conforming to the MTLTexture protocol) that you can use as a Metal render target.

Reference

Core Animation Functions
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.

QuartzCore StructuresQuartzCore EnumerationsQuartzCore Constants

Extended Types

NSValue

An NSValue object is a simple container for a single C or Objective-C data item. It can hold any of the scalar types such as int, float, and char, as well as pointers, structures, and object id references. Use this class to work with such data types in collections (such as NSArray and NSSet), Key-value coding, and other APIs that require Objective-C objects. NSValue objects are always immutable.

See Also