On Apr 29, 2013, at 9:33 AM, David Duncan <david.dun...@apple.com> wrote:

> On Apr 27, 2013, at 2:48 AM, Daniele Margutti <m...@danielemargutti.com> 
> wrote:
> 
>> If I try to rotate my hostView.layer (CALayer) using the function below I 
>> get wrong coordinates when I try to click at the same (rotated) point (the 
>> top,left coordinate of hostView)
> 
> Point conversion happens via the model layer, not the presentation layer. By 
> rotating the layer the way you've done, you've only changed the presentation 
> layer, rather than the model, and thus the hit testing fails.
> 
> Instead just set the layer's transform. If you want to customize the duration 
> then use the +[CATransaction setAnimationDuration:]. No need to get into 
> explicit animation and the many pitfalls that typically accompany it.

Hi David, thank you for your response;
I've also tried to use:

        [CATransaction begin];
        [CATransaction setAnimationDuration:4.0];
        hostViewLayer.affineTransform = 
CGAffineTransformMakeRotation(DEGREES_TO_RADIANS(-90));
        [CATransaction commit];

and using:
        hostViewLayer.transform = 
CATransform3DMakeRotation(DEGREES_TO_RADIANS(-90),0,0,1);

(while animation is not played) coordinates still at the old position 
(portrait) of the layer.
What am I wong?
_______________________________________________

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

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

Reply via email to