A set of options that affect the filtering, sorting, and management of results that Photos returns when you fetch asset or collection objects.
SDKs
- iOS 8.0+
- macOS 10.13+
- tvOS 10.0+
Framework
- Photos
Overview
Using class methods on the PHAsset
, PHCollection
, PHAsset
, and PHCollection
classes to fetch assets or collections produces a PHFetch
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 sort
properties. The set of available keys depends on which class you’re using to fetch assets or collections—see Table 1 for the list of keys supported by each class.
Class for Fetch Method | Supported Keys |
---|---|
| |
| |
| |
|
|