Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS: rotate an uiimageview

in my app I have an imageview, its name is arrow and I rotate it of 180 degrees in this way:

arrow.transform = CGAffineTransformMakeRotation(M_PI);

it work fine, but now I want that this imageview return in the original position; what's the value taht I should set to obtain it?

like image 793
cyclingIsBetter Avatar asked Jun 27 '12 16:06

cyclingIsBetter


1 Answers

To make it return to it's original position, just do this:

arrow.transform = CGAffineTransformMakeRotation(0);

In degrees, 0 radians is 0 degrees, so it should return to its original position.

like image 57
pasawaya Avatar answered Nov 15 '22 09:11

pasawaya