Type Method

creationRequestForCollectionList(withTitle:)

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

Declaration

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

Parameters

title

A name for the new collection list.

Return Value

A collection list creation request.

Discussion

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

To add collections to the newly created collection list or to change its title, use the methods listed in Modifying Collection Lists. To reference the newly created collection collection list later in the same change block or after the change block completes, use the placeholderForCreatedCollectionList property to retrieve a placeholder object.

See Also

Adding New Collection Lists

var placeholderForCreatedCollectionList: PHObjectPlaceholder

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