CALayer convertPoint:toLayer: affecting animations bug?
CALayer convertPoint:toLayer: affecting animations bug?
- Subject: CALayer convertPoint:toLayer: affecting animations bug?
- From: Seth Willits <email@hidden>
- Date: Wed, 10 Nov 2010 16:23:22 -0800
Has anyone every come across a problem where simply calling convertPoint:toLayer: (not even using the result at all) affects the behavior of animations?
CGPoint start, end;
start, end = ....;
// Enable/disable this line and it will change the behavior!
[rootLayer convertPoint:start toLayer:layerA];
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
layerA.position = start;
[CATransaction commit];
[CATransaction begin];
[CATransaction setAnimationDuration:2.0];
layerA.position = end;
[CATransaction commit];
What the above should do is immediately move layerA's position to start, and then animate it from start to end. Except if the convertPoint:toLayer: line is in there, it ignores the first transaction entirely and simply animates from whatever layerA's current position is, to end.
Sample project:
http://www.sethwillits.com/temp/CAConvertPointBug.zip
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden