Resolved How do I reset CGAffineTransform

Discussion in 'iPhone/iPad Programming' started by newbie80, May 11, 2011.

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

    macrumors member

    #1
    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:
    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.
     

Share This Page