I downloaded an gif image from the network using AFNetworking 2.0
then save it to camera roll using ALAssetsLibrary
[assetsLibrary writeImageToSavedPhotosAlbum:[responseObject CGImage] orientation:(ALAssetOrientation)[responseObject imageOrientation] completionBlock:^(NSURL *assetURL, NSError *error)
{
if (error)
{
[App showAlertWithTitle:@"Error" message:@"Save message failed"];
}
else
{
[App showAlertWithTitle:@"Success" message:@"Saved success"];
}
}];
Then I tried to retrieve this image from camera using UIImagePickerViewController
, but the image I retrieved was not a GIF image but a jpeg image with reference url:
UIImagePickerControllerReferenceURL = "assets-library://asset/asset.JPG?id=2E7C87E4-5853-4946-B86B-CC8AAF094307&ext=JPG";
I don't know whether the fault is ALAssetsLibrary
or UIImagePickerViewController
and how to surpass it