mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Update & document changes to ASPhotosFrameworkImageRequest handling of PHImageRequestOptionsDeliveryMode
This commit is contained in:
@@ -528,7 +528,9 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
// Get the best image we can.
|
// Get the best image we can.
|
||||||
PHAsset *imageAsset = [assetFetchResult firstObject];
|
PHAsset *imageAsset = [assetFetchResult firstObject];
|
||||||
PHImageRequestOptions *options = [request.options copy];
|
PHImageRequestOptions *options = [request.options copy];
|
||||||
|
if (options.deliveryMode == PHImageRequestOptionsDeliveryModeOpportunistic) {
|
||||||
options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
|
options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
|
||||||
|
}
|
||||||
|
|
||||||
[[PHImageManager defaultManager] requestImageForAsset:imageAsset
|
[[PHImageManager defaultManager] requestImageForAsset:imageAsset
|
||||||
targetSize:request.targetSize
|
targetSize:request.targetSize
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ extern NSString *const ASPhotosURLScheme;
|
|||||||
|
|
||||||
@discussion Some properties of this object are ignored when converting this request into a URL.
|
@discussion Some properties of this object are ignored when converting this request into a URL.
|
||||||
As of iOS SDK 9.0, these properties are `progressHandler` and `synchronous`.
|
As of iOS SDK 9.0, these properties are `progressHandler` and `synchronous`.
|
||||||
Note that PHImageRequestOptionsDeliveryModeOpportunistic is not recommended when using ASMultiplexImageNode,
|
Note that ASMultiplexImageNode does not support PHImageRequestOptionsDeliveryModeOpportunistic
|
||||||
because it sends multiple images and only the first will be accepted.
|
because it sends multiple images, and that mode will be replaced by PHImageRequestOptionsDeliveryModeHighQualityFormat
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, strong) PHImageRequestOptions *options;
|
@property (nonatomic, strong) PHImageRequestOptions *options;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user