Class

CAKeyframeAnimation

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

Declaration

@interface CAKeyframeAnimation : CAPropertyAnimation

Overview

You create a CAKeyframeAnimation object using the inherited animationWithKeyPath: 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.

For most types of animations, you specify the keyframe values using the values and keyTimes properties. During the animation, Core Animation generates intermediate values by interpolating between the values you provide. When animating a value that is a coordinate point, such as the layer’s position, you can specify a path for that point to follow instead of individual values. The pacing of the animation is controlled by the timing information you provide.

Topics

Providing keyframe values

values

An array of objects that specify the keyframe values to use for the animation.

path

The path for a point-based property to follow.

Keyframe timing

keyTimes

An optional array of NSNumber objects that define the time at which to apply a given keyframe segment.

timingFunctions

An optional array of CAMediaTimingFunction objects that define the pacing for each keyframe segment.

calculationMode

Specifies how intermediate keyframe values are calculated by the receiver.

Rotation Mode Attribute

rotationMode

Determines whether objects animating along the path rotate to match the path tangent.

Cubic Mode Attributes

tensionValues

An array of NSNumber objects that define the tightness of the curve.

continuityValues

An array of NSNumber objects that define the sharpness of the timing curve’s corners.

biasValues

An array of NSNumber objects that define the position of the curve relative to a control point.

Constants

Rotation Mode Values

These constants are used by the rotationMode property.

Value calculation modes

These constants are used by the calculationMode property.

Relationships

Inherits From

See Also

Animation

CAAnimation

The abstract superclass for animations in Core Animation.

CAAnimationDelegate

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

CAPropertyAnimation

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

CABasicAnimation

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

CASpringAnimation

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

CATransition

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

CAValueFunction

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