| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/QuartzCore.framework |
| Availability | Available in Mac OS X v10.5 and later. |
| Declared in | CAAnimation.h |
| Companion guides |
CAAnimation is an abstract animation class. It provides the basic support for the CAMediaTiming and CAAction protocols.
removedOnCompletion property
– isRemovedOnCompletion
timingFunction property
delegate property
– animationDidStart: delegate method
– animationDidStop:finished: delegate method
For more about Objective-C properties, see “Properties” in The Objective-C 2.0 Programming Language.
Specifies the receiver’s delegate object.
@property(retain) id delegate
Defaults to nil.
Important: The delegate object is retained by the receiver. This is a rare exception to the memory management rules described in Memory Management Programming Guide for Cocoa.
An instance of CAAnimation should not be set as a delegate of itself. Doing so (outside of a garbage-collected environment) will cause retain cycles.
CAAnimation.hDetermines if the animation is removed from the target layer’s animations upon completion.
@property BOOL removedOnCompletion
When YES, the animation is removed from the target layer’s animations once its active duration has passed. Defaults to YES.
CAAnimation.hAn optional timing function defining the pacing of the animation.
@property(retain) CAMediaTimingFunction *timingFunction
Defaults to nil, indicating linear pacing.
CAAnimation.hCreates and returns a new CAAnimation instance.
+ (id)animation
An CAAnimation object whose input values are initialized.
CAAnimation.hSpecifies the default value of the property with the specified key.
+ (id)defaultValueForKey:(NSString *)key
The name of one of the receiver’s properties.
The default value for the named property. Returns nil if no default value has been set.
If this method returns nil a suitable “zero” default value for the property is provided, based on the declared type of the key. For example, if key is a CGSize object, a size of (0.0,0.0) is returned. For a CGRect an empty rectangle is returned. For CGAffineTransform and CATransform3D, the appropriate identity matrix is returned.
If key is not a known for property of the class, the result of the method is undefined.
CAAnimation.hA synthesized accessor for the removedOnCompletion property.
- (BOOL)isRemovedOnCompletion
Specifies whether the value of the property for a given key is archived.
- (BOOL)shouldArchiveValueForKey:(NSString *)key
The name of one of the receiver’s properties.
YES if the specified property should be archived, otherwise NO.
Called by the object's implementation of encodeWithCoder:. The object must implement keyed archiving.
The default implementation returns YES.
CAAnimation.hCalled when the animation begins its active duration.
- (void)animationDidStart:(CAAnimation *)theAnimation
The CAAnimation instance that started animating.
CAAnimation.hCalled when the animation completes its active duration or is removed from the object it is attached to.
- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
The CAAnimation instance that stopped animating.
If YES, the animation reached the end of its active duration without being removed.
CAAnimation.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-10-31)