<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARSessionObserver/session(_:didChangeViewRotationAngle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:objc(pl)ARSessionObserver(im)session:didChangeViewRotationAngle:"
  },
  "title" : "session(_:didChangeViewRotationAngle:)"
}
-->

# session(_:didChangeViewRotationAngle:)

This is called when the view rotation angle changes.

```
optional func session(_ session: ARSession, didChangeViewRotationAngle viewRotationAngle: CGFloat)
```

## Parameters

`session`

The session that provides the angle.

`viewRotationAngle`

The angle, in degrees, normalized to `[0, 360)` (`0` at LandscapeRight, `90` at Portrait,
`180` at LandscapeLeft, and `270` at PortraitUpsideDown).

## Discussion

ARKit calls this method when a new angle becomes available, in step with the system UI rotation. Implement it to
rotate a view by the given angle so the `ARFrame` it displays stays level with the horizon as the device rotates.

---

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)