Skip to content

Instantly share code, notes, and snippets.

@yfujiki
Created July 15, 2013 04:12
Show Gist options
  • Save yfujiki/5997455 to your computer and use it in GitHub Desktop.
Save yfujiki/5997455 to your computer and use it in GitHub Desktop.
Take screenshot of current view
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:
UIGraphicsGetCurrentContext()];
UIImage *destinationImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment