Gesture that recognize rubbing motion in SwiftUI. Unlike DragGesture
, RubGesture
only recognizes drag events inside the view frame and ignores events outside the frame.
import RubGesture
.onRubGesture { length in
// Do something
}
- iOS 14.0+
- macOS 11.0+
- SwiftUI
- File > Swift Packages > Add Package Dependency
- Add https://github.com/Makeeyaf/RubGesture.git