<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARSession/viewRotationAngle-8847g",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "s:So9ARSessionC5ARKitE17viewRotationAngle14CoreFoundation7CGFloatVSgvp"
  },
  "title" : "viewRotationAngle"
}
-->

# viewRotationAngle

The angle, in degrees, to rotate a view by so the `ARFrame` it displays stays level with the horizon as the
device rotates.

```
@nonobjc var viewRotationAngle: CGFloat? { get }
```

## Discussion

Updates in step with the system UI rotation. The value is normalized to `[0, 360)` (`0` at LandscapeRight,
`90` at Portrait, `180` at LandscapeLeft, `270` at PortraitUpsideDown), or `nil` until the angle is available
(`viewLayer` is set and on screen). Read it on demand; implement `session(_:didChangeViewRotationAngle:)` to react
to changes.

---

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)