Creates a request for modifying the specified asset.


convenience init(for asset: PHAsset)



The asset to be modified.

Return Value

An asset change request.


Before editing an asset, use its canPerform(_:) method to see if the asset allows editing.

After you create a change request within a photo library change block, propose changes to the original asset’s properties by setting the corresponding properties of the change request. After Photos runs your change block, the asset’s properties reflect your changes. For details on change blocks, see PHPhotoLibrary.

To edit an asset’s image or video content, first begin a content editing session with the asset’s requestContentEditingInput(with:completionHandler:) method. You commit a content edit by setting the contentEditingOutput property of a change request within a change block. For more information about asset content editing, see PHAsset.

See Also

Modifying Assets

var creationDate: Date?

The date and time at which the asset claims to have been originally created.

var location: CLLocation?

The location information saved with the asset.

var isFavorite: Bool

A Boolean value that indicates whether the asset is marked as one of the user’s favorites.

var isHidden: Bool

A Boolean value that indicates whether the asset is hidden in collections.