Skip to content

Instantly share code, notes, and snippets.

@alobanov alobanov/gist:7615579
Last active Dec 29, 2015

Embed
What would you like to do?
Save image to Camera Roll
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
You can’t perform that action at this time.