struct Label
A type-erased label of a menu.
struct Content
A type-erased content of a menu.
Availability 有効性
Technology
struct MenuStyleConfiguration
Use the init(_:)
initializer of Menu
to create an instance using the current menu style, which you can modify to create a custom style.
For example, the following code creates a new, custom style that adds a red border to the current menu style:
struct RedBorderMenuStyle: MenuStyle {
func makeBody(configuration: Configuration) -> some View {
Menu(configuration)
.border(Color.red)
}
}
struct Label
struct Content
init(MenuStyleConfiguration )
Label
is MenuStyleConfiguration.Label
and Content
is MenuStyleConfiguration.Content
.