application(_:willChangeStatusBarOrientation:duration:)
Tells the delegate when the interface orientation of the status bar is about to change.
Declaration
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 Uiapplicationdelegate 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 object.
After calling this method, the app also posts a willChangeStatusBarOrientationNotification notification to give interested objects a chance to respond to the change.
See Also
Deprecated
application(_:didRegister:)application(_:didReceive:)application(_:didReceiveRemoteNotification:)application(_:handleActionWithIdentifier:for:completionHandler:)application(_:handleActionWithIdentifier:for:withResponseInfo:completionHandler:)application(_:handleActionWithIdentifier:forRemoteNotification:completionHandler:)application(_:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:)application(_:handleOpen:)application(_:open:sourceApplication:annotation:)application(_:didChangeStatusBarOrientation:)application(_:willChangeStatusBarFrame:)application(_:didChangeStatusBarFrame:)application(_:handle:completionHandler:)application(_:performFetchWithCompletionHandler:)application(_:shouldSaveApplicationState:)