<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/rotation3DLayout(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE16rotation3DLayoutyQrSo12SPRotation3DaF"
  },
  "title" : "rotation3DLayout(_:)"
}
-->

# rotation3DLayout(_:)

Rotates a view with impacts to its frame in a containing layout

```
@export(implementation) nonisolated func rotation3DLayout(_ rotation: Rotation3D) -> some View
```

## Parameters

`rotation`

A rotation to apply to the view and its frame.

## Discussion

The following example will rotate the top plane by 45 degrees while
adjusting its frame to account for this rotation. The VStack sizes to
fit the rotated and standard models.

```
VStack {
    Model3D(named: "plane")
        .rotation3DLayout(Rotation3D(angle: .degrees(45), axis: .z))
    Model3D(named: "plane")
```

}

The layout system will use a bounding box that completely contains
the rotated view, meaning this modifier can change the size of the
view it is applied to.

---

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)