---
title: "transformEffect(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/transformeffect(_:)"
---

# transformEffect(_:)

Applies an affine transformation to this view’s rendered output.

## Declaration

```swift
nonisolated func transformEffect(_ transform: CGAffineTransform) -> some View

```

## Parameters

- `transform`: A doc://com.apple.documentation/documentation/CoreFoundation/CGAffineTransform to apply to the view.

## Discussion

Discussion Use transformEffect(_:) to rotate, scale, translate, or skew the output of the view according to the provided CGAffineTransform. In the example below, the text is rotated at -30˚ on the y axis. let transform = CGAffineTransform(rotationAngle: -30 * (.pi / 180))

Text("Projection effect using transforms")     .transformEffect(transform)     .border(Color.gray)

## See Also

### Scaling, rotating, or transforming a view

- [scaledToFill()](swiftui/view/scaledtofill().md)
- [scaledToFit()](swiftui/view/scaledtofit().md)
- [scaleEffect(_:anchor:)](swiftui/view/scaleeffect(_:anchor:).md)
- [scaleEffect(_:anchor:)](swiftui/view/scaleeffect(_:anchor:).md)
- [scaleEffect(x:y:anchor:)](swiftui/view/scaleeffect(x:y:anchor:).md)
- [scaleEffect(x:y:z:anchor:)](swiftui/view/scaleeffect(x:y:z:anchor:).md)
- [aspectRatio(_:contentMode:)](swiftui/view/aspectratio(_:contentmode:).md)
- [rotationEffect(_:anchor:)](swiftui/view/rotationeffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/rotation3deffect(_:axis:anchor:anchorz:perspective:).md)
- [perspectiveRotationEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/view/perspectiverotationeffect(_:axis:anchor:anchorz:perspective:).md)
- [rotation3DEffect(_:anchor:)](swiftui/view/rotation3deffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:)](swiftui/view/rotation3deffect(_:axis:anchor:).md)
- [transform3DEffect(_:)](swiftui/view/transform3deffect(_:).md)
- [projectionEffect(_:)](swiftui/view/projectioneffect(_:).md)
- [ProjectionTransform](swiftui/projectiontransform.md)
