Resolved How do I reset CGAffineTransform

Discussion in 'iOS Programming' started by newbie80, May 11, 2011.

  1. newbie80, May 11, 2011
    Last edited by a moderator: May 11, 2011

    macrumors member

    Mar 2, 2011

    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 -, location.x -;
            [UIView beginAnimations:nil context:nil];
            CGAffineTransform viewTransform = CGAffineTransformMakeRotation(tempF);
            plans_shapea.transform = viewTransform;
            [UIView commitAnimations];
    Already found the solution.

Share This Page