Class

PHCollection

The abstract superclass for Photos asset collections and collection lists.

Declaration

@interface PHCollection : PHObject

Overview

You do not create or work with instances of this class directly. Instead, use one of its two concrete subclasses, PHAssetCollection or PHCollectionList.

  • A PHAssetCollection object represents a collection of photo or video assets, such as an album, moment, or Shared Photo Stream.

  • A PHCollectionList object represents a collection that contains other collections, such as a a folder containing albums or the set of all moments in a calendar year.

Topics

Fetching Collections

+ fetchCollectionsInCollectionList:options:

Retrieves collections from the specified collection list.

+ fetchTopLevelUserCollectionsWithOptions:

Retrieves collections from the root of the photo library’s hierarchy of user-created albums and folders.

Reading Collection Metadata

localizedTitle

The localized name of the collection.

Determining Collection Capabilities

canContainAssets

A Boolean value indicating whether the collection can contain assets.

canContainCollections

A Boolean value indicating whether the collection can contain other collections.

- canPerformEditOperation:

Returns whether the collection supports the specified editing operation.

PHCollectionEditOperation

Values identifying possible actions that a collection can support, used by the canPerformEditOperation: method.

Relationships

Inherits From

See Also

Asset Retrieval

Fetching Objects and Requesting Changes

Get assets, asset collections, and collection lists matching a specified query.

PHAsset

A representation of an image, video, or Live Photo in the Photos library.

PHAssetCollection

A representation of a Photos asset grouping, such as a moment, user-created album, or smart album.

PHCollectionList

A group containing Photos asset collections, such as Moments, Years, or folders of user-created albums.

PHObject

The abstract superclass for Photos model objects (assets and collections).

PHFetchResult

An ordered list of assets or collections returned from a Photos fetch method.

PHFetchOptions

A set of options that affect the filtering, sorting, and management of results that Photos returns when you fetch asset or collection objects.

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