<!--
{
  "availability" : [
    "iOS: 4.0.0 - 26.0.0",
    "iPadOS: 4.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.7.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMutableVideoCompositionLayerInstruction/setTransform(_:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMutableVideoCompositionLayerInstruction(im)setTransform:atTime:"
  },
  "title" : "setTransform(_:at:)"
}
-->

# setTransform(_:at:)

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

```
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

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 <doc://com.apple.documentation/documentation/CoreGraphics/CGAffineTransformIdentity>; after the last time for which a transform is set, the affine transform is held constant at that last value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)