• 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
Re: CALayer and frame
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer and frame


  • Subject: Re: CALayer and frame
  • From: Francisco Tolmasky <email@hidden>
  • Date: Fri, 25 Jan 2008 21:08:36 -0800

Right, but I'm trying to interpret what the derived property means in both cases.
It seems very strange that it gets "constructed" differently than it gets
"desconstructed" (hence myLayer.frame = myLayer.frame changing the object).


Francisco

On Jan 25, 2008, at 7:53 PM, Bill Dudney wrote:

Hi Francisco,

The frame is a derived property. Its a combination of position and bounds, so when you call setFrame: its really setting the bounds and position. When you call frame its using position and bounds to make a new rect.

HTH,


-bd- http://bill.dudney.net/roller/objc

On Jan 25, 2008, at 8:28 PM, Francisco Tolmasky wrote:

I'm wondering if someone can clear up my suspicions with CALayer's frame property.
Essentially, my confusion stems from the fact that doing:


myLayer.frame = myLayer.frame

*changes* the frame of the myLayer. From what I can perceive, it would appear that
[myLayer frame] returns the bounding box of the layer (the smallest rect that could
contain it), but [myLayer setFrame:] just sets the bounds equal to the frames size/width
and adjusts the anchor point. Is this correct?


Thanks,

Francisco
_______________________________________________

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


_______________________________________________

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


References: 
 >CALayer and frame (From: Francisco Tolmasky <email@hidden>)
 >Re: CALayer and frame (From: Bill Dudney <email@hidden>)

  • Prev by Date: Re: loaded subview not expanding correctly.
  • Next by Date: A Dynamic NSTextField
  • Previous by thread: Re: CALayer and frame
  • Next by thread: Re: CALayer and frame
  • Index(es):
    • Date
    • Thread