Editar

Compartilhar via


Photos Namespace

The Photos namespace provides classes for manipulating photo and video assets managed by the Photos App, including iCloud photos.

Classes

PHAdjustmentData

Application-specific "recipe" data for the most recent edit made to a PHAsset.

PHAsset

A PHObject representing a single photo or video.

PHAssetChangeRequest

Used within a Photos change block to create, update, or delete PHAsset objects.

PHAssetCollection

A collection of PHAssets.

PHAssetCollectionChangeRequest

Used within a Photos change block to create, update, or delete PHAssetCollection objects..

PHAssetContentEditingInputExtensions

Extension methods for PHAsset objects.

PHAssetCreationRequest

An object that can construct a new photo or video asset and add it to the Photos library.

PHAssetResource

A data resource that can be composed into a PHAsset.

PHAssetResourceCreationOptions

Options when creating assets from data resources.

PHAssetResourceManager

Allows manipulation of the data underlying a PHAsset.

PHAssetResourceRequestOptions

Options used when fetching resources with PHAssetResourceManager.

PHCachingImageManager

A PHImageManager that fetches or generates image data for PHAssets.

PHChange

Sent by the system and encapsulate details about changes to a fetch result (see PHFetchResult) or PHObject instances.

PHCloudIdentifier
PHCollection

Abstract collection of PHObjects. Concrete subtypes are PHAssetCollection and PHCollectionList.

PHCollectionList

A list of PHAssetCollections.

PHCollectionListChangeRequest

Used within a Photos change block to create, update, or delete PHCollectionList objects..

PHContentEditingInput

Describes an editable PHAsset.

PHContentEditingInputRequestOptions

Options used when requesting to edit an PHAsset.

PHContentEditingOutput

Describes the result of editing a PHAsset.

PHFetchOptions

Options used when retrieving objects of type PHAsset, PHCollection, PHAssetCollection, or PHCollectionList.

PHFetchResult

An ordered list of PHObject objects.

PHFetchResultChangeDetails

Differences between a fetch previously performed and what would be the results if the same fetch were performed now.

PHImageKeys

Constants indicating results of image loading. Used with RequestImageForAsset(PHAsset, CGSize, PHImageContentMode, PHImageRequestOptions, PHImageResultHandler), defines the keys and values passed to the PHImageResultHandler .

PHImageManager

A singleton object that allows loading PHAsset objects.

PHImageRequestOptions

Options used when retrieving images with the T:PHImageManager singleton.

PHLivePhoto

An image that contains motion and sound from the time it was captured.

PHLivePhotoEditingContext

An editing context for a live photo's image, audio, and video data.

PHLivePhotoEditingErrorExtensions
PHLivePhotoEditingOption

Contains a playback option for use when processing or editing a Live Photo.

PHLivePhotoInfo

Defines keys for the info dictionary passed to the result handler in RequestLivePhoto(NSUrl[], UIImage, CGSize, PHImageContentMode, Action<PHLivePhoto,NSDictionary>).

PHLivePhotoRequestOptions

Contains options for requesting live photos from a photo manager.

PHObject

Abstract class for elements within the Photos library; subclasses are individual PHAssets, composite PHCollections, or not-yet-created PHObjectPlaceholders.

PHObjectChangeDetails

Holds information between a fetched Photos object and the state of that asset or collection within the Photos library.

PHObjectPlaceholder

A read-only proxy for an PHAsset or PHCollectionList that has not yet been created, but will be created via a sequence of change requests.

PHPhotoLibrary

The entire set of data managed by the Photos app. This includes both locally stored assets and, if user-enabled, assets stored in iCloud.

PHPhotoLibrary_CloudIdentifiers
PHPhotoLibraryChangeObserver

Provides methods relating to changes in the PHPhotoLibrary.

PHProject
PHProjectChangeRequest
PHVideoRequestOptions

Options used when retrieiving videos with the T:Photos.PHPhotoManager singleton.

Interfaces

IPHLivePhotoFrame

Defines the interface for Live Photo frames that are produced by the system.

IPHPhotoLibraryChangeObserver

Interface representing the required methods (if any) of the protocol PHPhotoLibraryChangeObserver.

Enums

FigExifCustomRenderedValue
PHAssetBurstSelectionType

Indicates whether the Photos app or the user selected an asset as a favorite.

PHAssetCollectionSubtype

Enumerates values that describe the particular subtype (For example, time lapses, bursts, shared collections in the cloud, and etc.) of an asset collection.

PHAssetCollectionType

Enumerates varieties of PHAssetCollection.

PHAssetEditOperation

Enumerates values that indicate whether an operation edits or deletes an asset, changes its properties, or performs no action on the asset.

PHAssetMediaSubtype

Enumerates values that describe media subtypes. (HDR, panorama, streaming video, and etc.)

PHAssetMediaType

Enumerates the forms of PHAsset.

PHAssetPlaybackStyle
PHAssetResourceType

Enumerates types of PHAssetResource data.

PHAssetSourceType

Enumerates the means by which an asset entered the Photos library.

PHAuthorizationStatus

Enumerates the current authorization allowed by the application user.

PHCollectionEditOperation

Enumerates values that describe the editing operations that can be performed on a collection.

PHCollectionListSubtype

Enumerates values that indicate the subtype of the collection.

PHCollectionListType

Enumerates values that indicate whether a collection is a moment list, folder, or smart folder.

PHImageContentMode

Enumerates values that control how images are displayed.

PHImageRequestOptionsDeliveryMode

Enumerates values that control the desired balance between speed and quality when retrieving image data.

PHImageRequestOptionsResizeMode

Enumerates values that control the speed and accuracy of image resizing operations.

PHImageRequestOptionsVersion

Enumerates values that control whether to retrieve edited or unedited versions of images.

PHLivePhotoEditingError
PHLivePhotoFrameType

Enumerates Live Photo frame types.

PHProjectCreationSource
PHProjectSectionType
PHProjectTextElementType
PHVideoRequestOptionsDeliveryMode

Enumerates values that balance the load time and quality of video when requesting video data.

PHVideoRequestOptionsVersion

Enumerates values that control whether to return the edited or original version of a video asset.

Delegates

PHAssetImageProgressHandler

A continuation handler for that is called by the Photos application to show progress for an image request.

PHAssetVideoProgressHandler

Delegate type used with ProgressHandler.

PHChangeDetailEnumerator

Enumerates differences between snapshots of the objec at the specified indices.

PHContentEditingHandler

Completion handler for the RequestContentEditingInput(PHAsset, PHContentEditingInputRequestOptions, PHContentEditingHandler) method.

PHFetchResultEnumerator

Enumerates the assets in a fetch result.

PHImageDataHandler

Completion handler for the RequestImageData(PHAsset, PHImageRequestOptions, PHImageDataHandler) method.

PHImageManagerRequestAvAssetHandler

Completion handle for the RequestAvAsset(PHAsset, PHVideoRequestOptions, PHImageManagerRequestAvAssetHandler) method.

PHImageManagerRequestExportHandler

Completion handler for the RequestExportSession(PHAsset, PHVideoRequestOptions, String, PHImageManagerRequestExportHandler) method.

PHImageManagerRequestLivePhoto

The result handler delegate for calls to RequestLivePhoto(PHAsset, CGSize, PHImageContentMode, PHLivePhotoRequestOptions, PHImageManagerRequestLivePhoto).

PHImageManagerRequestPlayerHandler

Completion handler for the RequestPlayerItem(PHAsset, PHVideoRequestOptions, PHImageManagerRequestPlayerHandler) method.

PHImageResultHandler

Completion handler for the RequestImageForAsset(PHAsset, CGSize, PHImageContentMode, PHImageRequestOptions, PHImageResultHandler) method.

PHLivePhotoFrameProcessingBlock

Delegate that is called on every frame of a Live Photo as it is processed.

PHLivePhotoFrameProcessingBlock2
PHProgressHandler

Continuation handler for tracking image operation progress.

Remarks

The Photos namespace, introduced in iOS 8, allows application developers to manipulate photos and videos managed by the Photos app, including iCloud photos.

Capabilities of the Photos namespace include:

  • Fetching assets and collections of assets.:
  • Editing assets, including support for reverting changes.:
  • Observing changes in assets.:
  • Acces to Photos-provided data such as the Moments hierarchy, high-framerate video captures, whether photos were captured with panorama or burst mode, etc..:
  • Loading thumbnails and caching assets.: