Skip to content

Instantly share code, notes, and snippets.

@kokousin
Created February 27, 2011 16:22
Show Gist options
  • Save kokousin/846298 to your computer and use it in GitHub Desktop.
Save kokousin/846298 to your computer and use it in GitHub Desktop.
CGSize size = [view bounds].size;
UIGraphicsBeginImageContext(size);
[[view layer] renderInContext:UIGraphicsGetCurrentContext()];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment