I see.

Thanks for the explanation.. 

I will give it a try now.

Gustavo

On Feb 23, 2010, at 7:35 PM, David Duncan wrote:

> On Feb 23, 2010, at 10:15 AM, Gustavo Pizano wrote:
> 
>>> Additionally, rather than changing the anchorPoint do your animation based 
>>> on the center of the view instead of it's frame's origin (which will also 
>>> continue to work as you expect should you need to do an animation on a 
>>> layer that has a transform).
>> 
>> So When creating the CABasicAnimation I shall place the fromValue and 
>> ToValue to be the translated values? or I should set the CATransform3d with 
>> the translated layer position?
> 
> 
> The frame property of a layer is calculated from the layer's position, 
> anchorPoint, transform and bounds properties. When you set the frame of a 
> layer, that rectangle is used to calculate the layers new position and bounds 
> properties using the transform and the anchorPoint.
> 
> In general when moving a layer it is easier to change the layer's position 
> instead of the frame, as doing so is agnostic to the other properties of a 
> layer. Changing the frame or transform of a layer in order to move it tends 
> to lead to lots of head-meets-desk time as the developer tries to figure out 
> why their animation isn't working the way they expect it to.
> 
> In the UIView case, the center property corresponds to the position property, 
> and the anchorPoint left at its default 0.5,0.5.
> --
> David Duncan
> Apple DTS Animation and Printing
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to