init(for:)
Creates a request for modifying the specified asset collection.
Declaration
convenience init?(for assetCollection: PHAssetCollection)Parameters
- assetCollection:
The asset collection to be modified.
Return Value
An asset collection change request.
Discussion
After you create a change request within a photo library change block, propose changes to the collection’s title or list of member assets with the properties and instance methods of the change request. After Photos runs your change block, the asset collection reflects your changes. For details on change blocks, see PHPhotoLibrary.
Use this method when modifying an asset collection’s metadata or when adding or removing assets without regard to their arrangement. To work with indexes in the list of member assets, use the init(for:assets:) method instead.