Adopted by | |
Framework | /System/Library/Frameworks/QuartzCore.framework |
Availability | Available in Mac OS X v10.5 and later. |
Declared in | CAMediaTiming.h |
Companion guides |
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.
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:
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.
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.
beginTime
property
timeOffset
property
repeatCount
property
repeatDuration
property
autoreverses
property
fillMode
property
For more about Objective-C properties, see “Properties” in The Objective-C 2.0 Programming Language.
Determines if the receiver plays in the reverse upon completion.
@property BOOL autoreverses
When YES
, the receiver plays backwards after playing forwards. Defaults to NO
.
CAMediaTiming.h
Specifies the begin time of the receiver in relation to its parent object, if applicable.
@property CFTimeInterval beginTime
Defaults to 0.
CAMediaTiming.h
Specifies the basic duration of the animation, in seconds.
@property CFTimeInterval duration
Defaults to 0.
CAMediaTiming.h
Determines if the receiver’s presentation is frozen or removed once its active duration has completed.
@property(copy) NSString *fillMode
The possible values are described in “Fill Modes”
. The default is kCAFillModeRemoved
.
CAMediaTiming.h
Determines the number of times the animation will repeat.
@property float repeatCount
May be fractional. If the repeatCount
is 0, it is ignored. Defaults to 0. If both repeatDuration
and repeatCount
are specified the behavior is undefined.
CAMediaTiming.h
Determines how many seconds the animation will repeat for.
@property CFTimeInterval repeatDuration
Defaults to 0. If the repeatDuration
is 0, it is ignored. If both repeatDuration
and repeatCount
are specified the behavior is undefined.
CAMediaTiming.h
Specifies how time is mapped to receiver’s time space from the parent time space.
@property float speed
For example, if speed
is 2.0 local time progresses twice as fast as parent time. Defaults to 1.0.
CAMediaTiming.h
Specifies an additional time offset in active local time.
@property CFTimeInterval timeOffset
Defaults to 0. .
CAMediaTiming.h
These constants determine how the timed object behaves once its active duration has completed. They are used with the fillMode
property.
NSString * const kCAFillModeRemoved; NSString * const kCAFillModeForwards; NSString * const kCAFillModeBackwards; NSString * const kCAFillModeBoth; NSString * const kCAFillModeFrozen;
kCAFillModeRemoved
The receiver is removed from the presentation when the animation is completed.
Available in Mac OS X v10.5 and later.
Declared in CAMediaTiming.h
.
kCAFillModeForwards
The receiver remains visible in its final state when the animation is completed.
Available in Mac OS X v10.5 and later.
Declared in CAMediaTiming.h
.
kCAFillModeBackwards
The receiver clamps values before zero to zero when the animation is completed.
Available in Mac OS X v10.5 and later.
Declared in CAMediaTiming.h
.
kCAFillModeBoth
The receiver clamps values at both ends of the object’s time space
Available in Mac OS X v10.5 and later.
Declared in CAMediaTiming.h
.
kCAFillModeFrozen
The mode was deprecated before Mac OS X v10.5 shipped.
Deprecated in Mac OS X v10.5 and later.
Declared in CAMediaTiming.h
.
CAMediaTiming.h
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-03-04)