Skip to content

Latest commit

History

History
28 lines (22 loc) 路 371 Bytes

File metadata and controls

28 lines (22 loc) 路 371 Bytes

EXTENSION

Binding

public extension Binding where Value: Equatable

Methods

onChange(_:)

func onChange(_ action: @escaping (Value) -> Void) -> Self
Toggle(
    "Foo",
    isOn: $foo.onChange {
        bar.isEnabled = $0
    }
)

Parameters

Name Description
action Action to run