Skip to content

Instantly share code, notes, and snippets.

@spraveenk91
Created June 16, 2014 06:46
Show Gist options
  • Save spraveenk91/6b0e882b044b825517c5 to your computer and use it in GitHub Desktop.
Save spraveenk91/6b0e882b044b825517c5 to your computer and use it in GitHub Desktop.
Image Rotation
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