• 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: How to properly flip a UIView's coordinate system
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to properly flip a UIView's coordinate system


  • Subject: Re: How to properly flip a UIView's coordinate system
  • From: Quincey Morris <email@hidden>
  • Date: Sat, 21 Sep 2013 14:50:45 -0700

On Sep 21, 2013, at 13:38 , Markus Spoettl <email@hidden> wrote:

> When I remove the transformation, the animation takes place correctly, growing its frame, not just changing the position. Also, when I animate the frame, leaving the size as is, the animation does what is expected, too.
>
> So, it's the transform. Can I do something about that?

Yeah, there is. Don't animate the frame. To quote from the -[UIVIew frame] docs (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html):

> Changes to this property can be animated. However, if the transform property contains a non-identity transform, the value of the frame property is undefined and should not be modified. In that case, you can reposition the view using the center property and adjust the size using the bounds property instead.

With the transform you're using, the center stays the same (well, to within half a pixel), so you only have to animate the bounds instead of the frame.


_______________________________________________

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: How to properly flip a UIView's coordinate system
      • From: Markus Spoettl <email@hidden>
References: 
 >How to properly flip a UIView's coordinate system (From: Markus Spoettl <email@hidden>)

  • Prev by Date: How to properly flip a UIView's coordinate system
  • Next by Date: Re: How to properly flip a UIView's coordinate system
  • Previous by thread: How to properly flip a UIView's coordinate system
  • Next by thread: Re: How to properly flip a UIView's coordinate system
  • Index(es):
    • Date
    • Thread