Contents

init(id:placement:showsByDefault:content:)

Creates a toolbar item with the specified placement and content, which allows for user customization.

Declaration

nonisolated init(id: String, placement: ToolbarItemPlacement = .automatic, showsByDefault: Bool, @ViewBuilder content: () -> Content)

Parameters

  • id:

    A unique identifier for this item.

  • placement:

    Which section of the toolbar the item should be placed in.

  • showsByDefault:

    Whether the item appears by default in the toolbar, or only shows if the user explicitly adds it via customization.

  • content:

    The content of the item.

See Also

Creating a toolbar item