Instance Method インスタンスメソッド

labelStyle(_:)

Sets the style for labels within this view.

Declaration 宣言

func labelStyle<S>(_ style: S) -> some View where S : LabelStyle

Discussion 議論

Use this modifier to set a specific style for all labels within a view:


VStack {
    Label("Fire", systemImage: "flame.fill")
    Label("Lightning", systemImage: "bolt.fill")
}
.labelStyle(MyCustomLabelStyle())