• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why I can't change the view's layer anchorPoint?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why I can't change the view's layer anchorPoint?


  • Subject: Why I can't change the view's layer anchorPoint?
  • From: Gustavo Pizano <email@hidden>
  • Date: Sun, 9 May 2010 11:41:14 +0200

Hello, I have a view place in a superView which its setWantLayer to YES, also this inner view its a layer backed, when I click the inner view I want to flip it, so in the mouseDown of the view I implemented the flipped method making a CATransfor3D to rotate over the y axis PI radians, so when I click the view eventually it flips but it doesn't flips centered but like a page in a book,  so I set up a breakpoint and check the anchor point of the view's layer and its (0,1), I tried then to change it to 0.5,0.5 in the awakeFromNib but it doesnt help still is on 0,1, but if I change it on the mouseDown, the position goes to 0.0 (relative to the superlayer) and then it flips.. I read in the docs its the way it calculates the frame and bounds the CALayer

So I decided then to put the anchorPoint in the mouseDown and right after set the frame of the layer to the calculated position so it will be right where the view is.. the results??... well it try to jumps to 0.0 but then  it goes back to the new position I set... so im not liking it..

How can I make this view flip if I can't set up  view's layer anchorPoint at the very beginning?


Thanks

Gustavo

_______________________________________________

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

  • Follow-Ups:
    • Re: Why I can't change the view's layer anchorPoint?
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: NSBox sizeToFit problem
  • Next by Date: More general question related to : How do you set the text in an NSTextView?
  • Previous by thread: Re: isKindOfClass:
  • Next by thread: Re: Why I can't change the view's layer anchorPoint?
  • Index(es):
    • Date
    • Thread