init(_:selection:matching:preferredItemEncoding:)
Creates a picker with a title and selection, and optionally configures the types of items to show and item encoding behavior.
Declaration
nonisolated init<S>(_ title: S, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic) where S : StringProtocolParameters
- title:
A string that describes the purpose of showing the picker.
- selection:
The item the picker displays in a selected state.
- filter:
The types of items that the picker shows.
- preferredItemEncoding:
The encoding policy of the selection.
See Also
Creating a picker with a title
init(_:selection:matching:preferredItemEncoding:)init(_:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:)init(_:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:)init(_:selection:matching:preferredItemEncoding:photoLibrary:)init(_:selection:matching:preferredItemEncoding:photoLibrary:)init(_:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:photoLibrary:)init(_:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:photoLibrary:)