<!--
{
  "availability" : [
    "iOS: 2.0.0 - 13.0.0",
    "iPadOS: 2.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplicationDelegate/application(_:willChangeStatusBarOrientation:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIApplicationDelegate(im)application:willChangeStatusBarOrientation:duration:"
  },
  "title" : "application(_:willChangeStatusBarOrientation:duration:)"
}
-->

# application(_:willChangeStatusBarOrientation:duration:)

Tells the delegate when the interface orientation of the status bar is about to change.

```
optional func application(_ application: UIApplication, willChangeStatusBarOrientation newStatusBarOrientation: UIInterfaceOrientation, duration: TimeInterval)
```

## Parameters

`application`

Your singleton app object.

`newStatusBarOrientation`

A constant that indicates the new orientation of the app’s user interface; see [`Responding to app life-cycle events`](/documentation/UIKit/UIApplicationDelegate#Responding-to-app-life-cycle-events) for details.

`duration`

The duration of the animation to the new orientation, in seconds.

## Discussion

The delegate typically implements this method to prepare its windows and views for the new orientation. The delegate can get the current device orientation from the shared [`UIDevice`](/documentation/UIKit/UIDevice) object.

After calling this method, the app also posts a [`willChangeStatusBarOrientationNotification`](/documentation/UIKit/UIApplication/willChangeStatusBarOrientationNotification) notification to give interested objects a chance to respond to the change.

---

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)