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

Hjalmar picture Hjalmar · Apr 22, 2011 · Viewed 26.3k times · Source

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

Answer

Krishnabhadra picture Krishnabhadra · Apr 22, 2011

You can do it this way...

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