---
title: "postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/posttophotossharedalbumsheet(ispresented:items:photolibrary:defaultalbumidentifier:completion:)"
---

# postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:)

Presents an “Add to Shared Album” sheet that allows the user to post the given items to a shared album.

## Declaration

```swift
nonisolated func postToPhotosSharedAlbumSheet(isPresented: Binding<Bool>, items: [PHPickerResult], photoLibrary: PHPhotoLibrary, defaultAlbumIdentifier: String? = nil, completion: ((Result<Void, 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.
- `photoLibrary`: Library to choose from.
- `defaultAlbumIdentifier`: Identifier for the shared album to be pre-selected. If none provided user can manually choose the shared album in UI.
- `completion`: Called with the result on completion of the request.

## See Also

### Technology-specific modifiers

- [offerCodeRedemption(isPresented:onCompletion:)](swiftui/view/offercoderedemption(ispresented:oncompletion:).md)
- [subscriptionPromotionalOffer(offer:signature:)](swiftui/view/subscriptionpromotionaloffer(offer:signature:).md)
