당신이 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];
}
을 쓸 수는 너의 경우.
[this] (http://www.touch-code-magazine.com/ios5-saving-photos-in-custom-photo-album-category-for-download/)을 확인 했습니까? – TheTiger
그래, 내가 일찍이 봤어 @Vignesh 대답 아래에 내 의견을 봐 : – cojoj