Initializer

init(id:placement:showsByDefault:content:)

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

Declaration 宣言

init(id: String, placement: ToolbarItemPlacement = .automatic, showsByDefault: Bool = true, content: () -> Content)
Available when ID is String and Content conforms to View. IDStringであるそしてContentViewに準拠する時に利用可能です。

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