toolbarForegroundStyle(_:for:)
Specifies the preferred foreground style of bars managed by SwiftUI.
Declaration
nonisolated func toolbarForegroundStyle<S>(_ style: S, for bars: ToolbarPlacement...) -> some View where S : ShapeStyle
Discussion
This examples shows a view that renders the navigation bar with a blue foreground color.
NavigationStack {
ContentView()
.navigationTitle("Blue")
.toolbarForegroundStyle(
.blue, for: .navigationBar)
}