Skip to content

Instantly share code, notes, and snippets.

@spraveenk91
Created June 16, 2014 06:48
Show Gist options
  • Save spraveenk91/98842f772af38d0c4a33 to your computer and use it in GitHub Desktop.
Save spraveenk91/98842f772af38d0c4a33 to your computer and use it in GitHub Desktop.
UIGraphicsBeginImageContextWithOptions(myImage.frame.size, FALSE, 0.0);
CALayer* layer = myImage.layer;
[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