Skip to content

Gesture that recognize rubbing motion in SwiftUI

License

Notifications You must be signed in to change notification settings

maakcode/RubGesture

Repository files navigation

RubGesture

Gesture that recognize rubbing motion in SwiftUI. Unlike DragGesture, RubGesture only recognizes drag events inside the view frame and ignores events outside the frame.

eraser example moon phase example

Usage

import RubGesture

.onRubGesture { length in
    // Do something
}

Requirement

  • iOS 14.0+
  • macOS 11.0+
  • SwiftUI

Installation

Swift Package Manager

  1. File > Swift Packages > Add Package Dependency
  2. Add https://github.com/Makeeyaf/RubGesture.git