Created
June 16, 2014 06:46
-
-
Save spraveenk91/6b0e882b044b825517c5 to your computer and use it in GitHub Desktop.
Image Rotation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIRotationGestureRecognizer *rotationRecognizer = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(handleRotate:)]; | |
[rotationRecognizer setDelegate:self]; | |
[renderedImage addGestureRecognizer:rotationRecognizer]; | |
- (void)handleRotate:(UIRotationGestureRecognizer *)recognizer { | |
recognizer.view.transform = CGAffineTransformRotate(recognizer.view.transform, recognizer.rotation); | |
recognizer.rotation = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment