statusBar
The system status bar.
Declaration
static var statusBar: ToolbarPlacement { get }Discussion
Use with toolbarVisibility(_:for:) to hide the status bar, or with toolbarColorScheme(_:for:) to specify the preferred status bar style.
content
.toolbarVisibility(
hideStatusBar ? .hidden : .automatic,
for: .statusBar)
// use light status bar on a dark background
.toolbarColorScheme(.dark, for: .statusBar)Using this placement with other toolbar customization APIs has no effect.