Last active
December 29, 2015 04:29
-
-
Save alobanov/7615579 to your computer and use it in GitHub Desktop.
Save image to Camera Roll
This file contains 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
UIImageWriteToSavedPhotosAlbum(_currentVC.imageView.image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil); | |
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error | |
contextInfo:(void *)contextInfo | |
{ | |
// Was there an error? | |
if (error != NULL) | |
{ | |
UIAlertView *alert = [[UIAlertView alloc] init]; | |
[alert setTitle: @"Error, try again"]; | |
[alert addButtonWithTitle: @"Next"]; | |
[alert show]; | |
return; | |
// Show error message... | |
} | |
else // No errors | |
{ | |
UIAlertView *alert = [[UIAlertView alloc] init]; | |
[alert setTitle: @"Image saved"]; | |
[alert addButtonWithTitle: @"Next"]; | |
[alert show]; | |
return; | |
// Show message image successfully saved | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment