Gestures

1.0.6

Enhanced gesture API for SwiftUI
vospennikov/Gestures

What's New

1.0.6

2023-07-25T05:59:42Z

Full Changelog: 1.0.5...1.0.6

Gestures: Enhanced gesture API for SwiftUI

Swift Platform Framework Package Manager GitHub Demo

Gestures is a lightweight, open-source extension to the SwiftUI gesture API that removes a limitation before iOS 16 and macOS 13 - the inability to locate gestures.

How to Use

This code block demonstrates how to use the Gestures library with SwiftUI:

Rectangle()
  .onTouchGesture(count: 1) { gesture in
    print(gesture.location)
  }
  .onSwipeGesture(minimumDistance: 15.0, coordinateSpace: .local) { direction, location in
    print(direction, location)
  } onEnded: { direction, location in
    print(direction, location)
  }

For additional usage examples, please refer to the example application.

Getting Started: Installation

Swift Package Manager

To install the Gestures library with Swift Package Manager, add the following line to the dependencies array in your Package.swift file::

.package(url: "https://github.com/vospennikov/Gestures.git", .upToNextMinor(from: "1.0.6"))

Cocoapods

Alternatively, you can install Gestures using CocoaPods. Add the following line to your Podfile:

pod 'SUIGestures', '1.0.6'

Documentation

The documentation for releases and main are available here:

License

The Gestures library is available under the MIT license. See the LICENSE file for more info.

Description

  • Swift Tools 5.7.1
View More Packages from this Author

Dependencies

Last updated: Mon Apr 15 2024 01:28:02 GMT-0900 (Hawaii-Aleutian Daylight Time)