struct MenuStyleConfiguration
A configuration of a menu.
Availability 有効性
Technology
init(_ configuration: MenuStyleConfiguration
)
Label
is MenuStyleConfiguration.Label
and Content
is MenuStyleConfiguration.Content
.Use this initializer within the make
method of a Menu
instance to create an instance of the menu being styled. This is useful for custom menu styles that modify the current menu style.
For example, the following code creates a new, custom style that adds a red border around the current menu style:
struct RedBorderMenuStyle: MenuStyle {
func makeBody(configuration: Configuration) -> some View {
Menu(configuration)
.border(Color.red)
}
}
struct MenuStyleConfiguration