UISwitch

extension UISwitch
  • A convenience method wrapping the .onValueChanged event type for UISwitch.

    Declaration

    Swift

    @discardableResult
    public func onChange(handler: @escaping (_ value: Bool) -> Void) -> Self

    Parameters

    handler

    The closure to be called on the valueChanged event

    Return Value

    itself so you can daisy chain the other event handler calls