One Logo Pool Ball
SwiftUI · IOS API REFERENCE

ToolbarPlacement

struct · iOS 16.0+ · SDK 27.1

struct ToolbarPlacement

The placement of a toolbar. Use this type in conjunction with modifiers like ``View/toolbarBackground(_:for:)`` and ``View/toolbarVisibility(_:for:)`` to customize the appearance of different bars managed by SwiftUI. Not all bars support all types of customizations. See ``ToolbarItemPlacement`` to learn about the different regions of these toolbars that you can place your own controls into.

Members (5)

get · iOS 16.0+

navigationBar

TypeScript
static get navigationBar(): ToolbarPlacement
Swift declaration
static var navigationBar: ToolbarPlacement { get }

The navigation bar of an app.

get · iOS 16.0+

tabBar

TypeScript
static get tabBar(): ToolbarPlacement
Swift declaration
static var tabBar: ToolbarPlacement { get }

The tab bar of an app.

get · iOS 16.0+

automatic

TypeScript
static get automatic(): ToolbarPlacement
Swift declaration
static var automatic: ToolbarPlacement { get }

The primary toolbar. Depending on the context, this may refer to the navigation bar of an app on iOS, or watchOS, the tab bar of an app on tvOS, or the window toolbar / window titlebar of an app on macOS.

get · iOS 16.0+

bottomBar

TypeScript
static get bottomBar(): ToolbarPlacement
Swift declaration
static var bottomBar: ToolbarPlacement { get }

The bottom toolbar of an app.

get · iOS 27.0+

statusBar

TypeScript
static get statusBar(): ToolbarPlacement
Swift declaration
static var statusBar: ToolbarPlacement { get }

The system status bar. Use with ``View/toolbarVisibility(_:for:)`` to hide the status bar, or with ``View/toolbarColorScheme(_:for:)`` to specify the preferred status bar style. ```swift 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.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →