Initializer

init(_:content:)

Creates a menu that generates its label from a string.

Declaration 宣言

init<S>(_ title: S, content: () -> Content) where Label == Text, S : StringProtocol
Available when Label conforms to View and Content conforms to View.

Parameters パラメータ

title

A string that describes the contents of the menu.

content

A group of menu items.

Discussion 議論

To create the label with a localized string key, use init(_:content:) instead.

See Also 参照

Creating a Menu from Content