How get access to the full-size images from iСloud? Every time I try to get this picture, I get image size 256x342. I not see progress too.
Code:
PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[assetIdentifier] options:nil];
PHImageManager *manager = [PHImageManager defaultManager];
[result enumerateObjectsUsingBlock:^(PHAsset *asset, NSUInteger idx, BOOL *stop) {
PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
options.synchronous = YES;
options.networkAccessAllowed = YES;
options.progressHandler = ^(double progress, NSError *error, BOOL *stop, NSDictionary *info) {
NSLog(@"%f", progress);
};
[manager requestImageForAsset:asset targetSize:PHImageManagerMaximumSize contentMode:PHImageContentModeDefault options:options resultHandler:^(UIImage *resultImage, NSDictionary *info)
{
UIImage *image = resultImage;
NSLog(@"%@", NSStringFromCGSize(resultImage.size));
}];
}];
Until I click the picture in Photo app, this picture will be of poor quality. But as soon as I click on the picture, it downloaded on the device and will be full-size quality.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…