TechnologiesVideo, Photos & Camera

PhotosUI

iOSmacOStvOSwatchOSvisionOS

PhotosUI provides user interface components for working with a person's photo library on iOS, macOS, tvOS, watchOS, and visionOS. Present a PHPickerViewController, configured through PHPickerConfiguration and PHPickerFilter, to let people choose photos and videos without your app requesting full library access, and receive their choices as PHPickerResult values. Display motion and audio captured in Live Photos with PHLivePhotoView, and use the PhotosPickerItem and PhotosPickerStyle types to surface photo selection. For photo-editing extensions, the PHProject types, including PHProjectExtensionController and PHProjectInfo, describe a project's sections, elements, and assets, while PHSharedAlbumCreationViewController and its companion controllers support creating and customizing shared albums.

Photo Picker 8

Present a privacy-preserving picker that lets people choose photos and videos without granting full library access.

  • Cl
    PHPickerViewControllermacOS 13+
    A view controller that presents a privacy-preserving interface for choosing photos and videos from the photo library.
  • St
    PHPickerConfiguration
    A configuration for `PHPickerViewController`.
  • St
    PHPickerFilter
    A filter that restricts which types of assets `PHPickerViewController` can show.
  • St
    PHPickerResult
    A user selected asset from `PHPickerViewController`.
  • St
    PHPickerCapabilitiesmacOS 14+
    Constants that specify one or a set of \c PHPickerViewController capabilities.
  • St
    PHPickerMetadataOptionsmacOS 27+
    Constants that specify metadata options for \c PHPickerViewController.
  • St
    PHPickerMode
    An enum that determines the mode of `PHPickerViewController`.
  • St
    PHPickerSearchText
    A search text for `PHPickerViewController`.

Picker Configuration Options 2

Enumerations that control selection behavior and asset representation for the photo picker.

  • En
    PHPickerConfigurationSelectionmacOS 13+
    An enum that determines how \c PHPickerViewController handles user selection.
  • En
    PHPickerConfigurationAssetRepresentationModemacOS 13+
    A mode that determines which representation \c PHPickerViewController should provide for an asset given a type identifier, if multiple representations are available.

SwiftUI Photos Picker 3

Types that surface photo selection and represent chosen items in SwiftUI.

  • St
    PhotosPickerItem
    An item that can be provided to or provided by the Photos picker.
  • St
    PhotosPickerStyle
    A value that determines the style of the Photos picker.
  • St
    PhotosPickerSelectionBehavior
    A value that determines how the Photos picker handles user selection.

Live Photo Display 3

Display the motion and audio captured in a Live Photo and control its playback and layout.

  • Cl
    PHLivePhotoViewmacOS 10.12+
    A view that displays the motion and audio captured in a Live Photo.
  • En
    PHLivePhotoViewPlaybackStylemacOS 10.12+
    Constants that specify the style used to play back a Live Photo.
  • En
    PHLivePhotoViewContentModemacOS 10.12+
    Constants that specify how a Live Photo view scales its content to fit.

Shared Albums 6

View controllers and configuration types for creating, posting to, and customizing shared albums.

  • Cl
    PHSharedAlbumCreationViewControllermacOS 27+
    @abstract This class is used to present the shared album creation view from AppKit-based view controllers.
  • Cl
    PHSharedAlbumCustomizationViewControllermacOS 27+
    @abstract This class is used to present the shared album customization view from AppKit-based view controllers.
  • Cl
    PHSharedAlbumPostingViewControllermacOS 27+
    @abstract This class is used to present a view for posting assets to a shared album from AppKit-based view controllers.
  • St
    PHSharedAlbumCreationConfiguration
    An object used to configure a `PHSharedAlbumCreationViewController`.
  • St
    PHSharedAlbumCreationResult
    The result of a user creating a shared album.
  • En
    PHSharedAlbumCreationSharingPolicymacOS 27+
    The sharing policy for creating shared albums.

Project Extensions 4

Protocols and context that define the entry point and life cycle of a photo-editing project extension.

  • Pr
    PHProjectExtensionControllermacOS 10.13+
    The principal view controller for any Photos Project Extension must conform to the PHProjectExtensionController protocol.
  • Cl
    PHProjectExtensionContextmacOS 10.13+
    When a Photos project extension is initialized, it is handed a PHProjectExtensionContext object.
  • Pr
    PHProjectTypeDescriptionDataSourcemacOS 10.14+
    A protocol that supplies the project type descriptions an extension supports.
  • Pr
    PHProjectTypeDescriptionInvalidatormacOS 10.14+
    A protocol that signals when an extension's project type descriptions need to be refreshed.

Project Structure 4

Objects that describe a project's information, sections, and content.

  • Cl
    PHProjectInfomacOS 10.13+
    A PHProjectInfo object is created by Photos and passed along with a PHProjectExtensionContext any time Photos
  • Cl
    PHProjectSectionmacOS 10.13+
    A PHProjectSection object represents a collection of content for the project including asset elements and text elements.
  • Cl
    PHProjectSectionContentmacOS 10.13+
    A PHProjectSectionContent object contains all the elements and suggested layout information for a specific
  • Cl
    PHProjectRegionOfInterestmacOS 10.13+
    In PHProjectAssetElement objects, an array of PHProjectRegionOfInterest objects may be provided.

Project Elements 5

The individual element types that make up a project's sections.

  • Cl
    PHProjectElementmacOS 10.13+
    PHProjectElement is the superclass for all element objects. It is never directly used, but defines the shared
  • Cl
    PHProjectAssetElementmacOS 10.13+
    A PHProjectAssetElement object represents a media asset within a PHProjectSectionContent.
  • Cl
    PHProjectTextElementmacOS 10.13+
    A PHProjectTextElement object represents formatted, positioned text that should be considered
  • Cl
    PHProjectJournalEntryElementmacOS 10.13+
    A PHProjectJournalEntryElement object represents auxilary, date specific information that may be interesting
  • Cl
    PHProjectMapElementmacOS 10.14+
    A PHProjectMapElement object representing a map with annotations.

Project Types and Categories 3

Types that classify a project and describe the kinds of projects an extension supports.

  • St
    PHProjectType
    Extensible enumerator for PHProjectType. See PHProjectExtensionController.h for more information.
  • St
    PHProjectCategory
    Extensible enumerator for PHProjectCategory.
  • Cl
    PHProjectTypeDescriptionmacOS 10.13+
    A PHProjectTypeDescription object represents one project type choice in the project picker that is presented

Structures 1

  • St
    PhotosPicker
    A control that allows a user to choose photos and/or videos from the photo library.

Protocols 3

  • Pr
    PHContentEditingControllermacOS 10.11+
  • Pr
    PHLivePhotoViewDelegatemacOS 10.12+
  • Pr
    PHPickerViewControllerDelegate
    A set of methods that the delegate must implement to respond to `PHPickerViewController` user events.

Extends 2

ViewPHLivePhoto
← Video, Photos & Camera