PDA

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




newbie80
May 12, 2011, 12:18 AM
Hi,

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.