Type Method

creationRequestForAssetCollection(withTitle:)

Creates a request for adding a new asset collection to the Photos library.

Declaration

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

Parameters

image

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.

See Also

Adding New Asset Collections

var placeholderForCreatedAssetCollection: PHObjectPlaceholder

A placeholder object for the asset collection that the change request creates.