从没有iCloude资产的图库中获取视频

时间:2019-03-14 12:21:41

标签: ios objective-c nspredicate icloud phfetchoptions

如何从没有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]

0 个答案:

没有答案