One Logo Pool Ball
PhotosUI · IOS API REFERENCE

PHPickerConfiguration

struct · iOS 14.0+ · SDK 27.1

struct PHPickerConfiguration

A configuration for `PHPickerViewController`.

Members (22)

get · iOS 27.0+

searchText

TypeScript
get searchText(): (PHPickerSearchText) | null
Swift declaration
var searchText: PHPickerSearchText? { get set }

The search text for the picker. Default is `nil`.

set · iOS 27.0+

searchText

TypeScript
set searchText(value: (PHPickerSearchText) | null)
Swift declaration
var searchText: PHPickerSearchText? { get set }

The search text for the picker. Default is `nil`.

init · iOS 14.0+

init

TypeScript
static initPhotoLibrary(photoLibrary: _Photos_PHPhotoLibrary): PHPickerConfiguration
Swift declaration
init(photoLibrary: PHPhotoLibrary)

Initializes a new configuration with the `photoLibrary` the picker should use.

get · iOS 14.0+

selectionLimit

TypeScript
get selectionLimit(): number
Swift declaration
var selectionLimit: Int

The maximum number of assets that can be selected. Default is 1. Setting `selectionLimit` to 0 means maximum supported by the system.

set · iOS 14.0+

selectionLimit

TypeScript
set selectionLimit(value: number)
Swift declaration
var selectionLimit: Int

The maximum number of assets that can be selected. Default is 1. Setting `selectionLimit` to 0 means maximum supported by the system.

get · iOS 27.0+

metadataOptions

TypeScript
get metadataOptions(): PHPickerMetadataOptions
Swift declaration
var metadataOptions: PHPickerMetadataOptions { get set }

Metadata options for the picker. Default is `[]`.

set · iOS 27.0+

metadataOptions

TypeScript
set metadataOptions(value: PHPickerMetadataOptions)
Swift declaration
var metadataOptions: PHPickerMetadataOptions { get set }

Metadata options for the picker. Default is `[]`.

get · iOS 17.0+

disabledCapabilities

TypeScript
get disabledCapabilities(): PHPickerCapabilities
Swift declaration
var disabledCapabilities: PHPickerCapabilities { get set }

Capabilities of the picker that should be disabled. Default is `[]`.

set · iOS 17.0+

disabledCapabilities

TypeScript
set disabledCapabilities(value: PHPickerCapabilities)
Swift declaration
var disabledCapabilities: PHPickerCapabilities { get set }

Capabilities of the picker that should be disabled. Default is `[]`.

get · iOS 17.0+

edgesWithoutContentMargins

TypeScript
get edgesWithoutContentMargins(): _UIKit_NSDirectionalRectEdge
Swift declaration
var edgesWithoutContentMargins: NSDirectionalRectEdge { get set }

Edges of the picker that have no margin between the content and the edge (e.g. without bars in between). Default is `[]`.

set · iOS 17.0+

edgesWithoutContentMargins

TypeScript
set edgesWithoutContentMargins(value: _UIKit_NSDirectionalRectEdge)
Swift declaration
var edgesWithoutContentMargins: NSDirectionalRectEdge { get set }

Edges of the picker that have no margin between the content and the edge (e.g. without bars in between). Default is `[]`.

get · iOS 15.0+

preselectedAssetIdentifiers

TypeScript
get preselectedAssetIdentifiers(): Array<string>
Swift declaration
var preselectedAssetIdentifiers: [String] { get set }

Local identifiers of assets to be shown as selected when the picker is presented. Default is an empty array. `preselectedAssetIdentifiers` should be an empty array if `selectionLimit` is 1 or `photoLibrary` is not specified. Returned item providers for preselected assets are always empty.

set · iOS 15.0+

preselectedAssetIdentifiers

TypeScript
set preselectedAssetIdentifiers(value: Array<string>)
Swift declaration
var preselectedAssetIdentifiers: [String] { get set }

Local identifiers of assets to be shown as selected when the picker is presented. Default is an empty array. `preselectedAssetIdentifiers` should be an empty array if `selectionLimit` is 1 or `photoLibrary` is not specified. Returned item providers for preselected assets are always empty.

get · iOS 14.0+

preferredAssetRepresentationMode

TypeScript
get preferredAssetRepresentationMode(): PHPickerConfiguration_AssetRepresentationMode
Swift declaration
var preferredAssetRepresentationMode: PHPickerConfiguration.AssetRepresentationMode

The preferred representation mode of selected assets. Default is `.automatic`. Setting `preferredAssetRepresentationMode` to `.automatic` means the best representation determined by the system will be used.

set · iOS 14.0+

preferredAssetRepresentationMode

TypeScript
set preferredAssetRepresentationMode(value: PHPickerConfiguration_AssetRepresentationMode)
Swift declaration
var preferredAssetRepresentationMode: PHPickerConfiguration.AssetRepresentationMode

The preferred representation mode of selected assets. Default is `.automatic`. Setting `preferredAssetRepresentationMode` to `.automatic` means the best representation determined by the system will be used.

get · iOS 17.0+

mode

TypeScript
get mode(): PHPickerMode
Swift declaration
var mode: PHPickerMode

The mode of the picker. Default is `.default`.

set · iOS 17.0+

mode

TypeScript
set mode(value: PHPickerMode)
Swift declaration
var mode: PHPickerMode

The mode of the picker. Default is `.default`.

get · iOS 14.0+

filter

TypeScript
get filter(): (PHPickerFilter) | null
Swift declaration
var filter: PHPickerFilter?

Types of assets that can be shown. Default is `nil`. Setting `filter` to `nil` means all asset types can be shown.

set · iOS 14.0+

filter

TypeScript
set filter(value: (PHPickerFilter) | null)
Swift declaration
var filter: PHPickerFilter?

Types of assets that can be shown. Default is `nil`. Setting `filter` to `nil` means all asset types can be shown.

get · iOS 15.0+

selection

TypeScript
get selection(): PHPickerConfiguration_Selection
Swift declaration
var selection: PHPickerConfiguration.Selection

The selection behavior of the picker. Default is `.default`.

set · iOS 15.0+

selection

TypeScript
set selection(value: PHPickerConfiguration_Selection)
Swift declaration
var selection: PHPickerConfiguration.Selection

The selection behavior of the picker. Default is `.default`.

init · iOS 14.0+

init

TypeScript
static init(): PHPickerConfiguration
Swift declaration
init()

Initializes a new configuration with the system photo library. This configuration never returns asset identifiers.

Skipped declarations

No declarations were skipped in this snapshot.

All PhotosUI types →