Contents

photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)

Presents a view for allowing the user to create a new shared album.

Declaration

nonisolated func photosSharedAlbumCreationSheet(isPresented: Binding<Bool>, defaultTitle: String? = nil, defaultSharingPolicy: PHSharedAlbumCreationSharingPolicy? = nil, photoLibrary: PHPhotoLibrary, onCompletion: ((PHSharedAlbumCreationResult?) -> Void)? = nil) -> some View

Parameters

  • isPresented:

    The binding for whether the shared album creation view should be shown.

  • defaultTitle:

    The default title for the shared album. Useful for suggesting a relevant title to the user.

  • defaultSharingPolicy:

    The default sharing policy of the shared album. If nil, this defaults to .private.

  • photoLibrary:

    The photo library in which the shared album will be created.

  • onCompletion:

    The callback that will be invoked when shared album creation has succeeded or failed. If successful, the String will be the album’s identifier.

Discussion

See Also

Selecting photos