Skip to content

Instantly share code, notes, and snippets.

@kyleturner
Created January 6, 2012 14:57
Show Gist options
  • Save kyleturner/1570943 to your computer and use it in GitHub Desktop.
Save kyleturner/1570943 to your computer and use it in GitHub Desktop.
Takes a render of the current view's layer on screen and saves it as an image to the photo album
UIGraphicsBeginImageContext(webview.frame.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment