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
Stringwill be the album’s identifier.
Discussion
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(_:)photosSharedAlbumCustomizationSheet(isPresented:albumIdentifier:photoLibrary:onCompletion:)photosSharedAlbumPostingSheet(isPresented:items:defaultAlbumIdentifier:photoLibrary:completion:)