如何从没有iCloude资产的图库中获取视频?
当前显示“两种资产”
PHFetchOptions *options = [[PHFetchOptions alloc] init];
options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO]];
options.fetchLimit = 6;
options.predicate = [NSPredicate predicateWithFormat:@"mediaType = %d", PHAssetMediaTypeVideo];
self.assetsFetchResults = [PHAsset fetchAssetsWithOptions:options];
我曾尝试在 options.predicate 中使用“关注”功能,但无法正常工作。
[NSPredicate predicateWithFormat:@"sourceType = %d", PHAssetSourceTypeUserLibrary]
[NSPredicate predicateWithFormat:@“assetSource = %d", PHAssetSourceTypeUserLibrary]