Instance Property

fetchLimit

The maximum number of objects to include in the fetch result.

Declaration

var fetchLimit: Int { get set }

Discussion

With the default fetch limit of zero, Photos returns all requested assets or collections in a fetch result. Change this value to fetch more efficiently in situations where a potentially very large result is not needed. For example, to fetch only the most recently captured asset, call the fetchAssets(with:) method, using the sortDescriptors property to sort in descending date order, and setting a fetch limit of one.

See Also

Limiting Fetch Results

var includeAllBurstAssets: Bool

A Boolean value that determines whether the fetch result includes all assets from burst photo sequences.

var includeHiddenAssets: Bool

A Boolean value that determines whether the fetch result includes assets marked as hidden.

var includeAssetSourceTypes: PHAssetSourceType

The set of source types for which to include assets in the fetch result.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software