File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Example/SDWebImagePhotosPlugin Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibB
59
59
PHImageRequestOptions *options = [PHImageRequestOptions new ];
60
60
options.sd_targetSize = CGSizeMake (500 , 500 ); // The original image size may be 4K, we only query the max view size :)
61
61
SDWebImagePhotosLoader.sharedLoader .imageRequestOptions = options;
62
+ // Request Video Asset Poster as well
63
+ SDWebImagePhotosLoader.sharedLoader .requestImageAssetOnly = NO ;
62
64
63
65
// Photos Library Demo
64
66
[self fetchAssets ];
@@ -73,7 +75,6 @@ - (void)fetchAssets {
73
75
options: nil ];
74
76
PHAssetCollection *collection = result.firstObject ;
75
77
PHFetchOptions *fetchOptions = [PHFetchOptions new ];
76
- fetchOptions.predicate = [NSPredicate predicateWithFormat: @" mediaType = %d" , PHAssetMediaTypeImage];
77
78
fetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey: @" creationDate" ascending: NO ]];
78
79
PHFetchResult<PHAsset *> *assets = [PHAsset fetchAssetsInAssetCollection: collection options: fetchOptions];
79
80
for (PHAsset *asset in assets) {
You can’t perform that action at this time.
0 commit comments