• 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: Kyle Sluder <email@hidden>
  • Date: Wed, 25 Jan 2012 11:56:31 -0800

On Wed, Jan 25, 2012 at 11:24 AM, Seth Willits <email@hidden> wrote:
> On Jan 24, 2012, at 5:52 PM, David Duncan wrote:
>> 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.
>
> So let me just throw this out there. Is there some reason it couldn't be changed so that
>
>
> layer.frame = (0, 0, 100, 100);
> layer.transform = xfm;
> ...
> layer.frame = (0, 0, 200, 200);
>
>
> is equivalent to:
>
>
> layer.frame = (0, 0, 100, 100);
> layer.transform = xfm;
> …
> layer.transform = identity;
> layer.frame = (0, 0, 200, 200);
> layer.transform = xfm;
>
>
> The latter behaves nice and predictably, and if everyone is avoiding the "bag full of hurt" does it actually break anything?  *wishful thinking*

How about we change it by making frame a read-only property? :)

--Kyle Sluder

_______________________________________________

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

  • Prev by Date: Re: Confusing CALayer Transform/Frame/Bounds Behavior
  • Next by Date: Bindings crash
  • Previous by thread: Re: Confusing CALayer Transform/Frame/Bounds Behavior
  • Next by thread: Re: Confusing CALayer Transform/Frame/Bounds Behavior
  • Index(es):
    • Date
    • Thread