Contents

fetchCollectionListsContaining(_:options:)

Retrieves collection lists that contain the specified collection.

Declaration

class func fetchCollectionListsContaining(_ collection: PHCollection, options: PHFetchOptions?) -> PHFetchResult<PHCollectionList>

Parameters

  • collection:

    An asset collection or another collection list.

  • options:

    Options that specify a filter predicate and sort order for the fetched collection lists, or nil to use default options. For details, see Phfetchoptions.

Return Value

A fetch result that contains the requested PHCollectionList objects, or an empty fetch result if no objects match the request.

Discussion

Different kinds of collections have different containment possibilities. For example, an asset collection whose type is PHAssetCollectionType.album may be contained in a folder, or have no containing collection list. A folder, in turn, may be contained in another folder. An asset collection whose type is PHAssetCollectionType.moment is always contained by two collection lists: a moment cluster and a moment year.

See Also

Fetching Collection Lists