toolbarOverflowMenu(content:)
Configures the overflow menu of a toolbar.
Declaration
nonisolated func toolbarOverflowMenu<C>(@ContentBuilder content: () -> C) -> some View where C : View
Parameters
- content:
The content of the overflow menu.
Discussion
An overflow menu represents actions that are always placed in the toolbar’s overflow menu, regardless of the toolbar mode, platform, or customizability.
ContentView()
.toolbarOverflowMenu {
Button("Action 1") { }
Button("Action 2") { }
}In iOS and visionOS, this content is placed into the overflow menu in the navigation bar.