photosSharedAlbumPostingSheet(isPresented:items:defaultAlbumIdentifier:photoLibrary:completion:)
Presents an “Add to Shared Album” sheet that allows the user to post the given items to a shared album.
Declaration
nonisolated func photosSharedAlbumPostingSheet(isPresented: Binding<Bool>, items: [PHPickerResult], defaultAlbumIdentifier: String? = nil, photoLibrary: PHPhotoLibrary, completion: ((Result<String, any Error>) -> Void)? = nil) -> some View
Parameters
- isPresented:
The binding to whether the sheet should be shown.
- items:
The items to be posted to the shared album.
- defaultAlbumIdentifier:
Identifier for the shared album to be pre-selected. If none provided user can manually choose the shared album in UI.
- photoLibrary:
Library to choose from.
- completion:
Called with the result on completion of the request.
See Also
Selecting photos
PhotosPickerphotosPicker(isPresented:selection:matching:preferredItemEncoding:)photosPicker(isPresented:selection:matching:preferredItemEncoding:photoLibrary:)photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:)photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:photoLibrary:)photosPickerAccessoryVisibility(_:edges:)photosPickerDisabledCapabilities(_:)photosPickerSearchText(_:)photosPickerStyle(_:)photosPickerMetadataOptions(_:)photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)photosSharedAlbumCustomizationSheet(isPresented:albumIdentifier:photoLibrary:onCompletion:)