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 <edole...@gmail.com> 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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com