Skip to content

Instantly share code, notes, and snippets.

@marshluca
Created December 20, 2010 05:47
Show Gist options
  • Save marshluca/748068 to your computer and use it in GitHub Desktop.
Save marshluca/748068 to your computer and use it in GitHub Desktop.
save image to local album
- (void)saveImageToAlbum
{
UIImage *image = currentPage.imageView.image;
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
if (error == nil)
NSLog(@"This picture has been saved to your photo album.", @"Picture Saved");
else
NSLog(@"Please try it again later.", @"Saving Failed");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment