Initializer

init(_:id:content:)

Creates a window group with a localized title and an identifier.

Declaration 宣言

init(_ title: Text, id: String, content: () -> Content)

Parameters パラメータ

title

The Text view to use for the group’s title.

id

A string that uniquely identifies the window group. Identifiers must be unique among the window groups in your app.

content

A closure that creates the content for each instance of the group.

Discussion 議論

The window group uses the given view as a template to form the content of each window in the group. The system uses the title to distinguish the window group in the user interface, such as in the name of commands associated with the group. The system ignores any text styling in the title.

See Also 参照

Creating a Titled Window Group with an Identifier