One Logo Pool Ball
SwiftUI · IOS API REFERENCE

ContainerBackgroundPlacement

struct · iOS 17.0+ · SDK 27.1

struct ContainerBackgroundPlacement

The placement of a container background. This method controls where to place a background that you specify with the ``View/containerBackground(_:for:)`` or ``View/containerBackground(for:alignment:content:)`` modifier.

Members (2)

get · iOS 18.0+

navigation

TypeScript
static get navigation(): ContainerBackgroundPlacement
Swift declaration
static let navigation: ContainerBackgroundPlacement

A background placement inside a ``NavigationStack`` or ``NavigationSplitView``. For translucent backgrounds in a navigation split view, combine this placement with ``ContainerBackgroundPlacement/navigationSplitView``. NavigationSplitView { … sidebar … .containerBackground(.thinMaterial, for: .navigation) .containerBackground(Color.green, for: .navigationSplitView) } detail: { // … detail … .containerBackground(.thickMaterial, for: .navigation) }

get · iOS 18.0+

navigationSplitView

TypeScript
static get navigationSplitView(): ContainerBackgroundPlacement
Swift declaration
static let navigationSplitView: ContainerBackgroundPlacement

A background placement behind the content of a ``NavigationSplitView``. This is visible behind columns that are made translucent using the ``ContentBackgroundPlacement/navigation`` placement. For expanded split views, this container background is also visible between the columns as the divider color.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →