Skip to content

Instantly share code, notes, and snippets.

@duannguyenle
duannguyenle / gist:c9f525a013a145b81918c843b512631d
Last active February 8, 2018 08:12
YangMingShan bug: Load Photo with network access allowed
// In YMSPhotoCell class
- (void)loadPhotoWithManager:(PHImageManager *)manager forAsset:(PHAsset *)asset targetSize:(CGSize)size
{
self.imageManager = manager;
PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
options.networkAccessAllowed = YES;
options.resizeMode = PHImageRequestOptionsResizeModeExact;
options.synchronous = NO;
self.imageRequestID = [self.imageManager requestImageForAsset:asset