---
title: "transientAssetCollection(with:title:)"
framework: photos
role: symbol
role_heading: Type Method
path: "photos/phassetcollection/transientassetcollection(with:title:)"
---

# transientAssetCollection(with:title:)

Creates a temporary asset collection containing the specified assets.

## Declaration

```swift
class func transientAssetCollection(with assets: [PHAsset], title: String?) -> PHAssetCollection
```

## Parameters

- `assets`: An array of doc://com.apple.photokit/documentation/Photos/PHAsset objects.
- `title`: A name for the new temporary asset collection.

## Return Value

Return Value A new asset collection.

## Discussion

Discussion Transient asset collections are not saved to local storage or iCloud and do not appear in the Photos app or other apps using the Photos framework. A transient collection can be useful if you’ve designed a UI for displaying the contents of a collection and want to display an arbitrary set of assets.

## See Also

### Creating Temporary Asset Collections

- [transientAssetCollection(withAssetFetchResult:title:)](photos/phassetcollection/transientassetcollection(withassetfetchresult:title:).md)
