Contents

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