Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.
Functions and constants
init · iOS 16.0+init
TypeScriptstatic initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncodingPhotoLibrary(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount: (number) | null, selectionBehavior: PhotosPickerSelectionBehavior, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary)
Creates a Photos picker with its label generated from a localized string key that selects a collection of `PhotosPickerItem` from a given photo library.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- titleKey: A localized string key that describes the purpose of showing the picker.
- selection: All items being shown and selected in the Photos picker.
- maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system.
- selectionBehavior: The selection behavior of the Photos picker. Default is `.default`.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.
- photoLibrary: The photo library to choose from.
init · iOS 16.0+init
TypeScriptstatic initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncodingPhotoLibrary71217(title: string, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount: (number) | null, selectionBehavior: PhotosPickerSelectionBehavior, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init<S>(_ title: S, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary) where S : StringProtocol
Creates a Photos picker with its label generated from a string that selects a collection of `PhotosPickerItem` from a given photo library.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- title: A string that describes the purpose of showing the picker.
- selection: All items being shown and selected in the Photos picker.
- maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system.
- selectionBehavior: The selection behavior of the Photos picker. Default is `.default`.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.
- photoLibrary: The photo library to choose from.
init · iOS 16.0+init
TypeScriptstatic initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncoding(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount?: (number) | null, selectionBehavior?: PhotosPickerSelectionBehavior, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic)
Creates a Photos picker with its label generated from a localized string key that selects a collection of `PhotosPickerItem`.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- titleKey: A localized string key that describes the purpose of showing the picker.
- selection: All items being shown and selected in the Photos picker.
- maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system.
- selectionBehavior: The selection behavior of the Photos picker. Default is `.default`.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.
init · iOS 16.0+init
TypeScriptstatic initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncoding9462(title: string, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount?: (number) | null, selectionBehavior?: PhotosPickerSelectionBehavior, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init<S>(_ title: S, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic) where S : StringProtocol
Creates a Photos picker with its label generated from a string that selects a collection of `PhotosPickerItem`.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- title: A string that describes the purpose of showing the picker.
- selection: All items being shown and selected in the Photos picker.
- maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system.
- selectionBehavior: The selection behavior of the Photos picker. Default is `.default`.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.
init · iOS 16.0+init
TypeScriptstatic initSelectionMatchingPreferredItemEncodingPhotoLibrary(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary)
Creates a Photos picker with its label generated from a localized string key that selects a `PhotosPickerItem` from a given photo library.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- titleKey: A localized string key that describes the purpose of showing the picker.
- selection: The item being shown and selected in the Photos picker.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.
- photoLibrary: The photo library to choose from.
init · iOS 16.0+init
TypeScriptstatic initSelectionMatchingPreferredItemEncodingPhotoLibrary43487(title: string, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init<S>(_ title: S, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary) where S : StringProtocol
Creates a Photos picker with its label generated from a string that selects a `PhotosPickerItem` from a given photo library.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- title: A string that describes the purpose of showing the picker.
- selection: The item being shown and selected in the Photos picker.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.
- photoLibrary: The photo library to choose from.
init · iOS 16.0+init
TypeScriptstatic initSelectionMatchingPreferredItemEncoding(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic)
Creates a Photos picker with its label generated from a localized string key that selects a `PhotosPickerItem`.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- titleKey: A localized string key that describes the purpose of showing the picker.
- selection: The item being shown and selected in the Photos picker.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.
init · iOS 16.0+init
TypeScriptstatic initSelectionMatchingPreferredItemEncoding50544(title: string, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declarationnonisolated init<S>(_ title: S, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic) where S : StringProtocol
Creates a Photos picker with its label generated from a string that selects a `PhotosPickerItem`.
The user explicitly grants access only to items they choose, so photo library access authorization is not needed.
- Parameters:
- title: A string that describes the purpose of showing the picker.
- selection: The item being shown and selected in the Photos picker.
- filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown.
- preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.