Если вы используете AssetsLibrary вы можете написать этот код
- (void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
UIImagePickerController *imagePicker;
if (buttonIndex < 2)
{
self.library = [[[ALAssetsLibrary alloc] init] autorelease];
self.imageEditor = [[[DemoImageEditor alloc] initWithNibName:@"DemoImageEditor" bundle:nil] autorelease];
self.imageEditor.doneCallback = ^(UIImage *editedImage, BOOL canceled){
if(!canceled)
{
anotherImage = true;
NSString *imageName;
imageName [email protected]"Abc.jpg";
UIImageWriteToSavedPhotosAlbum(editedImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
editedImage = [self scaleImage:editedImage toSize:CGSizeMake(600,600)];
[[NSUserDefaults standardUserDefaults] setObject:UIImagePNGRepresentation(editedImage)forKey:@"image"];
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
UIAlertView *alert;
if (error)
alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Unable to save image to Photo Album."
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
else
alert = [[UIAlertView alloc] initWithTitle:@"Success"
message:@"Image saved to Photo Album."
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert release];
}
Это будет решать ваш случай.
Вы проверили [это] (http://www.touch-code-magazine.com/ios5-saving-photos-in-custom-photo-album-category-for-download/)? – TheTiger
Да, я видел это раньше, но смотрю на мой комментарий в @Vignesh ответить :) – cojoj