Gesture

public protocol Gesture

This protocol represents a stream of actions that will be performed based on the implemented gesture.

  • Declaration

    Swift

    associatedtype Value
  • Declaration

    Swift

    associatedtype Body : Gesture
  • Storage for onChanged events

    Declaration

    Swift

    var onChanged: ((Self.Value) -> Void)? { get set }
  • Storage for onChanged events

    Declaration

    Swift

    var onEnded: ((Self.Value) -> Void)? { get set }
  • Returns the concrete gesture that this gesture represents

    Declaration

    Swift

    var body: Self.Body { get }

Public Types

  • onChanged(_:) Extension method

    Event that fires when the value of an active gesture changes

    Declaration

    Swift

    public func onChanged(_ action: @escaping (Self.Value) -> Void) -> Self
  • onEnded(_:) Extension method

    Event that fires when an active gesture ends

    Declaration

    Swift

    public func onEnded(_ action: @escaping (Self.Value) -> Void) -> Self