<!--
{
  "availability" : [
    "iOS: 2.0.0 - 8.0.0",
    "iPadOS: 2.0.0 - 8.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/didRotate(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(im)didRotateFromInterfaceOrientation:"
  },
  "title" : "didRotate(from:)"
}
-->

# didRotate(from:)

Sent to the view controller after the user interface rotates.

```
func didRotate(from fromInterfaceOrientation: UIInterfaceOrientation)
```

## Parameters

`fromInterfaceOrientation`

The old orientation of the user interface. For possible values, see [`UIInterfaceOrientation`](/documentation/UIKit/UIInterfaceOrientation).

## Discussion

Subclasses may override this method to perform additional actions immediately after the rotation. For example, you might use this method to reenable view interactions, start media playback again, or turn on expensive drawing or live updates. By the time this method is called, the [`interfaceOrientation`](/documentation/UIKit/UIViewController/interfaceOrientation) property is already set to the new orientation. Your implementation of this method must call `super` at some point during its execution.

This method is called regardless of whether your code performs one-step or two-step rotations.

---

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)