Protocol

CAMediaTiming

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

Declaration

@protocol CAMediaTiming

Overview

Absolute time is defined as mach time converted to seconds. The CACurrentMediaTime function is provided as a convenience for getting the current absolute time.

The conversion from parent time to local time has two stages:

  1. Conversion to “active local time.” This includes the point at which the object appears in the parent object's timeline and how fast it plays relative to the parent.

  2. Conversion from “active local time” to “basic local time.” The timing model allows for objects to repeat their basic duration multiple times and, optionally, to play backwards before repeating.

Topics

Animation Start Time

beginTime

Specifies the begin time of the receiver in relation to its parent object, if applicable.

Required.

timeOffset

Specifies an additional time offset in active local time.

Required.

Repeating Animations

repeatCount

Determines the number of times the animation will repeat.

Required.

repeatDuration

Determines how many seconds the animation will repeat for.

Required.

Duration and Speed

duration

Specifies the basic duration of the animation, in seconds.

Required.

speed

Specifies how time is mapped to receiver’s time space from the parent time space.

Required.

Playback Modes

autoreverses

Determines if the receiver plays in the reverse upon completion.

Required.

fillMode

Determines if the receiver’s presentation is frozen or removed once its active duration has completed.

Required.

Constants

Fill Modes

These constants determine how the timed object behaves once its active duration has completed. They are used with the fillMode property.

Relationships

Conforming Types

See Also

Animation Timing

CACurrentMediaTime

Returns the current absolute time, in seconds.

CAMediaTimingFunction

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

CADisplayLink

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