Created
December 20, 2010 05:47
-
-
Save marshluca/748068 to your computer and use it in GitHub Desktop.
save image to local album
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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