---
title: "setCropRectangle(_:at:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avvideocompositionlayerinstruction/configuration/setcroprectangle(_:at:)"
---

# setCropRectangle(_:at:)

Sets the crop rectangle value at a time within the time range of the instruction.

## Declaration

```swift
mutating func setCropRectangle(_ rect: CGRect, at time: CMTime)
```

## See Also

### Configuring the crop rectangle

- [addCropRectangleRamp(_:)](avfoundation/avvideocompositionlayerinstruction/configuration/addcroprectangleramp(_:).md)
- [cropRectangleRamp(at:)](avfoundation/avvideocompositionlayerinstruction/configuration/croprectangleramp(at:).md)
