---
title: "setTransform(_:at:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablevideocompositionlayerinstruction/settransform(_:at:)"
---

# setTransform(_:at:)

Sets the transform value at a time within the time range of the instruction.

## Declaration

```swift
func setTransform(_ transform: CGAffineTransform, at time: CMTime)
```

## Parameters

- `transform`: The transform to be applied at time.
- `time`: A time value within the time range of the composition instruction.

## Discussion

Discussion Sets a fixed transform to apply from the specified time until the next time at which a transform is set. This is the same as setting a flat ramp for that time range. Before the first specified time for which a transform is set, the affine transform is held constant at the value of CGAffineTransformIdentity; after the last time for which a transform is set, the affine transform is held constant at that last value.

## See Also

### Managing properties

- [setOpacity(_:at:)](avfoundation/avmutablevideocompositionlayerinstruction/setopacity(_:at:).md)
- [setOpacityRamp(fromStartOpacity:toEndOpacity:timeRange:)](avfoundation/avmutablevideocompositionlayerinstruction/setopacityramp(fromstartopacity:toendopacity:timerange:).md)
- [setTransformRamp(fromStart:toEnd:timeRange:)](avfoundation/avmutablevideocompositionlayerinstruction/settransformramp(fromstart:toend:timerange:).md)
