PHCollectionList
A group containing Photos asset collections, such as Moments, Years, or folders of user-created albums.
Declaration
class PHCollectionListMentioned in
Overview
In the Photos framework, collection objects (including asset collections) do not directly reference their member objects, and there are no other objects that directly reference collection objects. To retrieve the members of a collection list, fetch them with a PHCollection class method such as fetchCollections(in:options:). To find objects at the root of the collection list hierarchy (such as album folders with no parent folders), use the fetchTopLevelUserCollections(with:) method.
Like assets and asset collections, collection lists are immutable. To create, rename, or delete collection lists, or to add, remove, or rearrange members in a collection list, create a PHCollectionListChangeRequest object within a photo library change block. For details on using change requests and change blocks to update the photo library, see PHPhotoLibrary.
Topics
Fetching Collection Lists
fetchCollectionListsContaining(_:options:)fetchCollectionLists(withLocalIdentifiers:options:)fetchCollectionLists(with:subtype:options:)fetchMomentLists(with:containingMoment:options:)fetchMomentLists(with:options:)
Reading Collection List Metadata
collectionListTypePHCollectionListTypecollectionListSubtypePHCollectionListSubtypestartDateendDatelocalizedLocationNames