It does! Excellent. Any idea why this one works when the other one
doesn't (or is it just trial and error really)?
Dan,
The 'frame' property of a layer is somewhat different than the AppKit
notion of a frame — frame for a layer is a calculated property,
derived from the 'bounds', 'position', 'anchor point', and 'transform'
of a layer. Explicit animations on the frame property are not
supported, but the primitive properties that make up the frame (like
'position') are. (Please file a bug at <http://bugreporter.apple.com>
if you think this should be supported.)
However, it sounds like you can still use implicit animations for your
situation. Just adjust the timing function and repeat count of the
animation you return from the layer's delegate's -
actionForLayer:forKey: method: when animating the 'frame' property.
The delegate method will get called for the primitive properties of
'frame' that you change by setting the frame:
// somewhere in your code
layer.frame = CGRectMake(...);
// in the layer's delegate
- (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)key {
// 'position' is modified when changing the origin of the 'frame'
property
return nil; // do the default animation for everything else
}
I didn't compile that, but it should give you the idea of how to go
about it. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartz-dev/email@hidden