• 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: Group CGAffineTransform Animations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Group CGAffineTransform Animations?


  • Subject: Re: Group CGAffineTransform Animations?
  • From: David Duncan <email@hidden>
  • Date: Thu, 18 Jun 2009 09:39:00 -0700

On Jun 17, 2009, at 10:45 PM, WT wrote:

If the center is in the superview's coordinate system, how can it not be changed by a translation?

Because the center is only 1 part in the chorus of things that determines where your view is. All of this really translates to Core Animation under the covers, and what UIKit reports to you as the center of a view is the view's layer's position. So lets go strictly to layers for a moment.


A layer has 4 properties that affect its area on screen – position, bounds.size, anchorPoint and transform. All of these properties together produce the final bounding rect in 3D space for the layer, which is then flattened into the frame rect that we all know and love.

So the position property of the layer never changes when you transform a layer, regardless of the transform. The layer moves when you apply a translation transform to it because you've changed the bounding rect that was calculated from the transform along with the other 3 properties I mentioned.

In the view's own coordinate system, yes, I can see that that's true, because then the center is half-way the bounds' width and height, and those don't change under a translation.


The view's center property is the point around which the view bounds are located. If you change the view's layer's anchorPoint, then the view's center will have a different meaning. It defaults to half way between, but really its saying to place half of the bounds on either side of the position.
--
David Duncan
Apple DTS Animation and Printing


_______________________________________________

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: Group CGAffineTransform Animations?
      • From: WT <email@hidden>
References: 
 >Re: Group CGAffineTransform Animations? (From: Erik Buck <email@hidden>)
 >Re: Group CGAffineTransform Animations? (From: WT <email@hidden>)
 >Re: Group CGAffineTransform Animations? (From: David Duncan <email@hidden>)
 >Re: Group CGAffineTransform Animations? (From: WT <email@hidden>)

  • Prev by Date: [iPhone]MKAnnotation of "showUserLocation"-getting a reference to my own location pin
  • Next by Date: Re: Manually updating a data bound value of a bound text field
  • Previous by thread: Re: Group CGAffineTransform Animations?
  • Next by thread: Re: Group CGAffineTransform Animations?
  • Index(es):
    • Date
    • Thread