View Full Version : [Resolved] How do I reset CGAffineTransform

May 12, 2011, 12:18 AM

After I rotated my image, how do I reset my image to previous state or initial state? Any help would be thankful.

The following is my code:
float tempF = atan2(location.y - plans_shapea.center.y, location.x - plans_shapea.center.x);

[UIView beginAnimations:nil context:nil];

CGAffineTransform viewTransform = CGAffineTransformMakeRotation(tempF);

plans_shapea.transform = viewTransform;
[UIView commitAnimations];

Already found the solution.