Hjalmar Hjalmar - 5 months ago 47
iOS Question

Get the current angle/rotation/radian for a UIview?

How do you get the current angle/rotation/radian a UIview has?

Answer

You can do it this way...

CGFloat radians = atan2f(yourView.transform.b, yourView.transform.a); 
CGFloat degrees = radians * (180 / M_PI);
Comments