IOS 如何保存图片到相册实例

作者:朱克锋

邮箱:[email protected]

转载请注明出处:http://blog.csdn.net/linux_zkf

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo; 

{

if (!error) 

NSLog(@"OK");

else

NSLog(@"Error");

}


- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info

{

UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];

UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);

[self dismissModalViewControllerAnimated:YES];

[picker release];

}

你可能感兴趣的:(ios,image,相册)