Skip to content

Instantly share code, notes, and snippets.

@zld
Created May 6, 2016 06:07
Show Gist options
  • Save zld/4a2a07a6812bccf70372e5f2d0eae037 to your computer and use it in GitHub Desktop.
Save zld/4a2a07a6812bccf70372e5f2d0eae037 to your computer and use it in GitHub Desktop.
CGImageRef imageRef = CGImageCreateWithImageInRect([image CGImage], rect);
UIImage *img = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment