PHFetchOptions
A set of options that affect the filtering, sorting, and management of results that Photos returns when you fetch asset or collection objects.
Declaration
class PHFetchOptionsMentioned in
Overview
Using class methods on the PHAsset, PHCollection, PHAssetCollection, and PHCollectionList classes to fetch assets or collections produces a PHFetchResult object containing the requested objects. The options you specify control which objects the fetch result includes, how those objects are arranged in the fetch result, and how Photos should notify your app of changes to the fetch result.
Photos supports only a restricted set of keys for the predicate and sortDescriptors properties. The set of available keys depends on which class you’re using to fetch assets or collections. The following table lists the keys supported by each class:
Class for Fetch Method | Supported Keys |
|---|---|
| |
| |
| |
Phcollection (can fetch a mix of Phcollectionlist and Phassetcollection objects) |
|