ToolbarItemPlacement
A structure that defines the placement of a toolbar item.
Declaration
struct ToolbarItemPlacementOverview
There are two types of placements:
Semantic placements, such as principal and navigation, denote the intent of the item being added. SwiftUI determines the appropriate placement for the item based on this intent and its surrounding context, like the current platform.
Positional placements, such as navigationBarLeading, denote a precise placement for the item, usually for a particular platform.
In iOS, iPadOS, and macOS, the system uses the space available to the toolbar when determining how many items to render in the toolbar. If not all items fit in the available space, an overflow menu may be created and remaining items placed in that menu.