Contents

fetchCollections(in:options:)

Retrieves collections from the specified collection list.

Declaration

class func fetchCollections(in collectionList: PHCollectionList, options: PHFetchOptions?) -> PHFetchResult<PHCollection>

Parameters

  • collectionList:

    The collection list from which to fetch collections.

  • options:

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

Return Value

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

Discussion

By default, the returned PHFetchResult object contains all collections in the specified collection list. To retrieve a more specific set of assets, provide a PHFetchOptions object that contains a filter predicate.

See Also

Fetching Collections