---
title: "canPerform(_:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phcollection/canperform(_:)"
---

# canPerform(_:)

Returns whether the collection supports the specified editing operation.

## Declaration

```swift
func canPerform(_ anOperation: PHCollectionEditOperation) -> Bool
```

## Parameters

- `anOperation`: A bit mask of editing operations to be tested.

## Return Value

Return Value true if the asset supports the specified editing operation; otherwise, false.

## Discussion

Discussion If an asset collection or collection list supports editing, you can create a PHAssetCollectionChangeRequest or PHCollectionListChangeRequest object inside a PHPhotoLibrary change block to submit a change.

## See Also

### Determining Collection Capabilities

- [canContainAssets](photos/phcollection/cancontainassets.md)
- [canContainCollections](photos/phcollection/cancontaincollections.md)
- [PHCollectionEditOperation](photos/phcollectioneditoperation.md)
