• 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: Getting the true rotation of a UIView layer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the true rotation of a UIView layer


  • Subject: Re: Getting the true rotation of a UIView layer
  • From: Graham Cox <email@hidden>
  • Date: Wed, 15 Mar 2017 14:29:52 +1100

Get the final transform, then use it to transform an angle of 0. The result is the angle.

—Graham



> On 15 Mar 2017, at 2:13 PM, Eric E. Dolecki <email@hidden> wrote:
>
> Once done (I dispatch after the randomSpeed duration), I'd like to
> determine the angle it's currently at.
>
> *let transform:CATransform3D = innerRing.layer.transform*
> *let angle: CGFloat = atan2(transform.m12, transform.m11);*
> *print(angle)*
>
> Always prints 0.0
>
> Am I missing something obvious? I almost thought about using hitTest but
> there must be a way to get this after each spin?
>
> Thank you,
> Eric


_______________________________________________

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: Getting the true rotation of a UIView layer
      • From: "Eric E. Dolecki" <email@hidden>
References: 
 >Getting the true rotation of a UIView layer (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Getting the true rotation of a UIView layer
  • Next by Date: Re: Auto-sized table cells, for macOS
  • Previous by thread: Getting the true rotation of a UIView layer
  • Next by thread: Re: Getting the true rotation of a UIView layer
  • Index(es):
    • Date
    • Thread