I want to obtain the referenceURL to the image that I saved into camera roll using UIImageWriteToSavedPhotosAlbum(). iOS 4.1 or above can do it easily by using AssetLibrary.
ALAssetsLibraryWriteImageCompletionBlock completionBlock = ^(NSURL* url, NSError* error) {
if (error == nil) {
savedURL = url;
}
};
UIImage * originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
NSMutableDictionary * metadata = (NSMutableDictionary *)[info objectForKey:UIImagePickerControllerMediaMetadata];
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library writeImageToSavedPhotosAlbum:originalImage.CGImage
metadata:metadata
completionBlock:completionBlock];
但是,在早期的Si-Si,为摄像图书馆保存图像的唯一途径是UIImageWrite ToSavedPhotosAlbum(Saved)。 我认为,一种方式是利用ALAssets来审视挽救的形象。 小组等。 这对我来说不是聪明的,它只会帮助4国集团。
Thank you in advance,
Kiyo