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

makeBody(configuration:)

Creates a view that represents the body of a toggle switch.

Declaration 宣言

func makeBody(configuration: SwitchToggleStyle.Configuration) -> some View

Return Value 戻り値

A view that represents a switch.

Parameters パラメータ

configuration

The properties of the toggle, including a label and a binding to the toggle’s state.

Discussion 議論

SwiftUI implements this required method of the ToggleStyle protocol to define the behavior and appearance of the switch toggle style. Don’t call this method directly. Rather, the system calls this method for each Toggle instance in a view hierarchy that’s styled as a switch.

See Also 参照

Rendering a Toggle トグルを描出する