creationRequestForAssetCollection(withTitle:)

creationRequestForAssetCollection(withTitle:)

creationRequestForAssetCollection(withTitle:) Type Method of PHAssetCollectionChangeRequest Creates a request for adding a new asset collection to the Photos library.

class func creationRequestForAssetCollection(withTitle title: String) -> Self

Parameters

title

A name for the new asset collection.

Return Value

An asset collection creation request.

Discussion

Call this method within a photo library change block to create a new asset collection. For details on change blocks, see PHPhotoLibrary.

To add assets to the newly created asset collection or change its title, use the methods listed in Modifying Asset Collections. To reference the newly created asset collection later in the same change block or after the change block completes, use the placeholderForCreatedAssetCollection property to retrieve a placeholder object.