UIStatusBarManager
UIStatusBarManager represents what a scene's status bar looks like right now: whether it is hidden, its style, and how much room it takes up. It is read-only; to change the status bar, set the view controller's prefersStatusBarHidden and preferredStatusBarStyle.
Inheritance: EventTarget → NSObject → UIStatusBarManager
Constructor
Can't be created with new; doing so throws TypeError. Read it from the scene's statusBarManager.
Instance properties
All read-only; each gives the value at the moment it is read.
| Property | Description |
|---|---|
isStatusBarHidden read-only | Whether the status bar is hidden |
statusBarStyle read-only | The status bar's style |
statusBarFrame read-only | The area the status bar occupies |
Examples
js
application.addEventListener('sceneconnect', (e) => {
const bar = e.scene.statusBarManager;
console.log(bar.isStatusBarHidden, bar.statusBarStyle);
});Result: logs false default.
Corresponding iOS API
UIStatusBarManager.
See also
UIViewController:prefersStatusBarHidden,preferredStatusBarStyle