作者:我病态见不得你跟别人恩爱 | 来源:互联网 | 2023-09-03 14:14
APHCollectionListisafolderthatcouldcontainanynumberofalbumsandorfolders.Iamcurrentl
A PHCollectionList
is a folder that could contain any number of albums and/or folders. I am currently fetching the collections within the list via PHCollection.fetchCollectionsInCollectionList(list, options: nil)
.
PHCollectionList是可以包含任意数量的专辑和/或文件夹的文件夹。我目前正通过PHCollection.fetchCollectionsInCollectionList(list,options:nil)获取列表中的集合。
This could return objects of type PHAssetCollection
or PHCollectionList
. I am only interested in knowing of the PHAssetCollection
s in that list. The docs state you can apply a filter predicate using the fetch options in order to return a subset of the data, but I don't see how I would use that in order to only get albums. How do you use PHFetchOptions
in order to return only PHAssetCollection
s in a given PHCollectionList
?
这可以返回PHAssetCollection或PHCollectionList类型的对象。我只对了解该列表中的PHAssetCollections感兴趣。文档声明您可以使用fetch选项应用过滤谓词以返回数据的子集,但我不知道如何使用它来获取专辑。如何使用PHFetchOptions只返回给定PHCollectionList中的PHAssetCollections?
2 个解决方案