init(placement:content:label:)
Creates a toolbar item group with the specified placement, content, and a label describing that content.
Declaration
nonisolated init<C, L>(placement: ToolbarItemPlacement = .automatic, @ViewBuilder content: () -> C, @ViewBuilder label: () -> L) where Content == LabeledToolbarItemGroupContent<C, L>, C : View, L : ViewParameters
- placement:
Which section of the toolbar the item should be placed in.
- content:
The content of the item.
- label:
The label describing the content of the item.
Discussion
A toolbar item group provided a label wraps its content within a ControlGroup which allows the content to collapse down into a menu that presents its content based on available space.