On 9/6/12, Eric Wing <ewmail...@gmail.com> wrote:
> I want to rotate an NSView around its center. (Example: Imagine me
> rotating a magnetic compass around so the North pointer rotates around
> to the bottom.
>
> I thought setFrameCenterRotation would do this for me. But when I try
> it (10.8), it always rotates about the bottom-left corner, not the
> center. I thought this API was supposed to do it around the center and
> setFrameRotation did the bottom-left corner. (Both do the bottom-left
> for me.)
>
> Am I losing my mind? Can somebody confirm the behavior? I can't tell
> by the Apple docs.
>
> Thanks,
> Eric
> --
> Beginning iPhone Games Development
> http://playcontrol.net/iphonegamebook/
>

To answer my own question, it appears that Auto Layout is breaking the
setFrameCenterRotation behavior. The moment I disable Auto Layout, it
seems to rotate around the center as I would expect.

An aside, I noticed that rotating with the animator has a very strange
animation. Instead of spinning around the center, it seems to
simultaneously translate and rotate which creates a wobbly (seasick)
animation while its rotating. I don't think it is very usable as is
unfortunately.

-Eric
-- 
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________

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