I'm trying to save an image that is currently in my image view to the Camera Roll. The image I'm trying to save shows up perfectly in the image view, via [mainImage setImage:outputImage];
However, when I try to press the button that saves the image:
- (IBAction)saveImage:(id)sender {
UIImageWriteToSavedPhotosAlbum([mainImage image], self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}
-(void)image:(UIImage*)image didFinishSavingWithError:(NSError *)error contextInfo:(void*)contextInfo{
NSLog(@"%@", [error localizedDescription]);
}
The camera roll is empty. I'm using iOS7 simulator. Any help would be appreciated!
EDIT: The Assertion doesn't say anything either.
~Carpetfizz
[ALAssetsLibrary authorizationStatus]
to see if the app has permission. – ryan cumley Nov 11 '13 at 20:29