• 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: Confusing CALayer Transform/Frame/Bounds Behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confusing CALayer Transform/Frame/Bounds Behavior


  • Subject: Re: Confusing CALayer Transform/Frame/Bounds Behavior
  • From: David Duncan <email@hidden>
  • Date: Tue, 24 Jan 2012 17:52:39 -0800

On Jan 24, 2012, at 4:23 PM, Seth Willits wrote:

> Can anyone explain what's going on?


The frame is an entirely synthesized property, based on the bounds, position, anchorPoint and transform of a given layer. When you set the latter parameters, the frame updates automatically but when you set the frame Core Animation has to derive the new bounds & position values by applying the anchorPoint and inverse transform. Thus when you set the frame of a layer while it is under a transform, the inverse transform is first applied to get a new size, then that size updates the bounds size.

Moral of the story is that when a layer is transformed (or may be) you should only manipulate its position and bounds. Stay far far away from the frame property, as its just a bag of hurt.
--
David Duncan

_______________________________________________

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: Confusing CALayer Transform/Frame/Bounds Behavior
      • From: Seth Willits <email@hidden>
References: 
 >Confusing CALayer Transform/Frame/Bounds Behavior (From: Seth Willits <email@hidden>)

  • Prev by Date: Confusing CALayer Transform/Frame/Bounds Behavior
  • Next by Date: Re: Programmatically create aliases to unmounted servers?
  • Previous by thread: Confusing CALayer Transform/Frame/Bounds Behavior
  • Next by thread: Re: Confusing CALayer Transform/Frame/Bounds Behavior
  • Index(es):
    • Date
    • Thread