The CAMediaTiming
constant kCAFillModeFrozen
has been deprecated and replaced by kCAFillModeForwards
. See “New API” for more information.
New API has been added to several Core Animation classes.
The Core Animation API now uses the is
Property accessor pattern for Boolean properties. The affected classes and the new getters are:
CAAnimation
isRemovedOnCompletion
isAdditive
isCumulative
CIFilterAdditions
isEnabled
CALayer
isHidden
isDoubleSided
isOpaque
CAOpenGLLayer
isAsynchronous
CATextLayer
isWrapped
The following API has been added to CAMediaTiming
:
@protocol CAMediaTiming |
/* Deprecate kCAFillModeFrozen. Replace with: */ |
CA_EXTERN NSString * const kCAFillModeForwards; |
CA_EXTERN NSString * const kCAFillModeBackwards; |
CA_EXTERN NSString * const kCAFillModeBoth; |
/* `forwards' is equivalent to existing `frozen', `backwards' clamps time |
* values before zero to zero, `both' clamps time values at both ends |
* of the object's time space. */ |
@end |
The following API has been added to CAKeyframeAnimation
:
@interface CAKeyframeAnimation |
/* Defines whether objects animating along paths rotate to match the |
* path tangent. Possible values are `auto' and `autoReverse'. Defaults |
* to nil. The effect of setting this property to a non-nil value when |
* no path object is supplied is undefined. `autoReverse' rotates to |
* match the tangent plus 180 degrees. */ |
@property(copy) NSString *rotationMode; |
CA_EXTERN NSString * const kCAAnimationRotateAuto; |
CA_EXTERN NSString * const kCAAnimationRotateAutoReverse; |
@end |
The following new API has been added to CATiledLayer
:
@interface CATiledLayer |
/* The time in seconds that newly added images take to "fade-in" to the |
* rendered representation of the tiled layer. The default implementation |
* returns 0.25 seconds. */ |
+ (CFTimeInterval)fadeDuration; |
@end |
The following new API has been added to CALayer
:
@interface CALayer |
/* Returns a copy of the layer containing all properties as they were |
* at the start of the current transaction, with any active animations |
* applied. This gives a close approximation to the version of the layer |
* that is currently displayed. |
* |
* The effect of attempting to modify the returned layer in any way is |
* undefined. |
* |
* The `sublayers', `mask' and `superlayer' properties of the returned |
* layer return the presentation versions of these properties. This |
* carries through to read-only layer methods. E.g., calling -hitTest: |
* on the result of the -presentationLayer will query the presentation |
* values of the layer tree. */ |
- (id)presentationLayer; |
/* When called on the result of the -presentationLayer method, returns |
* the underlying layer with the current model values. The result of |
* calling this method after the transaction that produced the |
* presentation layer has completed is undefined. */ |
- (id)modelLayer; |
/* This initializer is used to create shadow copies of layers, e.g. |
* for the -presentationLayer method. Subclasses can optionally copy |
* their instance variables into the new object. Subclasses should |
* always invoke the superclass implementation; calling this method in |
* any other situations will produce undefined behavior. */ |
- (id)initWithLayer:(id)layer; |
/* Returns the animation added to the layer with identifier 'key', or nil |
* if no such animation exists. Attempting to modify any properties of |
* the returned object will result in undefined behavior. */ |
- (CAAnimation *)animationForKey:(NSString *)key; |
/* A rectangle in the unit coordinate space defining the subrectangle |
* of the `contents' property that will be drawn into the layer. If |
* pixels outside the unit rectangles are requested, the edge pixels of |
* the contents image will be extended outwards. If an empty rectangle |
* is provided, the results are undefined. Defaults to the unit |
* rectangle [0 0 1 1]. Animatable. */ |
@property CGRect contentsRect; |
/* A bitmask defining how the edges of the layer are rasterized. For |
* each of the four edges (left, right, bottom, top) if the |
* corresponding bit is set the edge will be antialiased. Typically |
* this property is used to disable antialiasing for edges that abut |
* edges of other layers, to eliminate the seams that would otherwise |
* occur. The default value is for all edges to be antialiased. */ |
enum CAEdgeAntialiasingMask |
{ |
kCALayerLeftEdge = 1U << 0, |
kCALayerRightEdge = 1U << 1, |
kCALayerBottomEdge = 1U << 2, |
kCALayerTopEdge = 1U << 3, |
}; |
@property unsigned int edgeAntialiasingMask; |
/** Layer `contentsGravity' values. **/ |
/* Similar to kCAGravityResizeAspect except that it resizes the contents |
* of the layer to fill the bounds (while preserving its aspect ratio.) */ |
CA_EXTERN NSString * const kCAGravityResizeAspectFill; |
@end |
In Mac OS X V10.5 release 365 and later the Core Animation API has undergone a significant renaming. The earlier API will be maintained temporarily for compatibility; it will be removed in a future seed. You must update your projects to use the new API names before Leopard is released.
“New Core Animation class names” details the mapping of old class and protocol names to the new naming scheme.
Original Class/Protocol Name | New Class/Protocol Name |
---|---|
LKAction | CAAction |
LKAnimation | CAAnimation |
LKAnimationGroup | CAAnimationGroup |
LKBasicAnimation | CABasicAnimation |
LKConstraint | CAConstraint |
LKConstraintLayoutManager | CAConstraintLayoutManager |
LKConstraintManager | CAConstraintManager |
LKKeyframeAnimation | CAKeyframeAnimation |
LKLayer | CALayer |
LKLayoutManager | CALayoutManager |
LKOpenGLLayer | CAOpenGLLayer |
LKPropertyAnimation | CAPropertyAnimation |
LKScrollLayer | CAScrollLayer |
LKTextLayer | CATextLayer |
LKTiledLayer | CATiledLayer |
LKTiming | CAMediaTiming |
LKTimingFunction | CAMediaTimingFunction |
LKTransaction | CATransaction |
LKTransition | CATransition |
The LKObject
protocol has been deprecated. The methods that were exposed have now been directly added to the CAAnimation
and CALayer
classes. The key-value coding extensions that were documented in the LKObject
reference have been temporarily added to Core Animation Programming Guide.
The LKTransform
stuct has been renamed CATransform3D
. The related LKTransform*
functions have been renamed accordingly.
The LKCurrentAbsoluteTime()
function has been renamed CACurrentMediaTime()
.
The constants exposed using the prefix kLK*
have all been renamed kCA*
.
Two new classes have been added to Core Animation: CATiledLayer
and CARenderer
. The CATiledLayer
class allows you to provide content incrementally. The CARenderer
class allows you to render an animation into a Core OpenGL context directly.
Several new properties have been added to the CALayer
class. The minification
and magnification
properties allow you to specify a filter to use when scaling the content of a layer. The anchorPoint
property allows you to specify the location in a layer around which transforms are applied.
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-05-31)
|