---
title: "photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/photossharedalbumcreationsheet(ispresented:defaulttitle:defaultsharingpolicy:photolibrary:oncompletion:)"
---

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

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

## Declaration

```swift
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

Discussion note: When creation is finished, onCompletion will be called beforeisPresented is set to false. If the user cancels creation, isPresented will be set to false and onCompletion will not be called.

## See Also

### Selecting photos

- [PhotosPicker](photosui/photospicker.md)
- [photosPicker(isPresented:selection:matching:preferredItemEncoding:)](swiftui/view/photospicker(ispresented:selection:matching:preferreditemencoding:).md)
- [photosPicker(isPresented:selection:matching:preferredItemEncoding:photoLibrary:)](swiftui/view/photospicker(ispresented:selection:matching:preferreditemencoding:photolibrary:).md)
- [photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:)](swiftui/view/photospicker(ispresented:selection:maxselectioncount:selectionbehavior:matching:preferreditemencoding:).md)
- [photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:photoLibrary:)](swiftui/view/photospicker(ispresented:selection:maxselectioncount:selectionbehavior:matching:preferreditemencoding:photolibrary:).md)
- [photosPickerAccessoryVisibility(_:edges:)](swiftui/view/photospickeraccessoryvisibility(_:edges:).md)
- [photosPickerDisabledCapabilities(_:)](swiftui/view/photospickerdisabledcapabilities(_:).md)
- [photosPickerSearchText(_:)](swiftui/view/photospickersearchtext(_:).md)
- [photosPickerStyle(_:)](swiftui/view/photospickerstyle(_:).md)
- [photosPickerMetadataOptions(_:)](swiftui/view/photospickermetadataoptions(_:).md)
- [photosSharedAlbumCustomizationSheet(isPresented:albumIdentifier:photoLibrary:onCompletion:)](swiftui/view/photossharedalbumcustomizationsheet(ispresented:albumidentifier:photolibrary:oncompletion:).md)
- [photosSharedAlbumPostingSheet(isPresented:items:defaultAlbumIdentifier:photoLibrary:completion:)](swiftui/view/photossharedalbumpostingsheet(ispresented:items:defaultalbumidentifier:photolibrary:completion:).md)
