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

# projectionEffect(_:)

Applies a projection transformation to this view’s rendered output.

## Declaration

```swift
nonisolated func projectionEffect(_ transform: ProjectionTransform) -> some View

```

## Parameters

- `transform`: A doc://com.apple.SwiftUI/documentation/SwiftUI/ProjectionTransform to apply to the view.

## Discussion

Discussion Use projectionEffect(_:) to apply a 3D transformation to the view. The example below rotates the text 30˚ around the z axis, which is the axis pointing out of the screen: // This transform represents a 30˚ rotation around the z axis. let transform = CATransform3DMakeRotation(     -30 * (.pi / 180), 0.0, 0.0, 1.0)

Text("Projection effects using transforms")     .projectionEffect(.init(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)
- [transformEffect(_:)](swiftui/view/transformeffect(_:).md)
- [transform3DEffect(_:)](swiftui/view/transform3deffect(_:).md)
- [ProjectionTransform](swiftui/projectiontransform.md)
