I have the following code
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{
NSLog(@"failed");
}
which checks for the error, and it prints out time I run the following
-(IBAction) addWallpaper{
UIImageWriteToSavedPhotosAlbum( [UIImage imageNamed:[NSString stringWithFormat:@"%d.png", r]]
, self, @selector(image:didFinishSavingWithError:contextInfo:), nil );
}
How do I correctly saved the UIImage to the photo album?