An open API service indexing awesome lists of open source software.

https://github.com/dankinsoid/vdgesture


https://github.com/dankinsoid/vdgesture

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# VDGesture

[![CI Status](https://img.shields.io/travis/dankinsoid/VDGesture.svg?style=flat)](https://travis-ci.org/dankinsoid/VD)
[![Version](https://img.shields.io/cocoapods/v/VDGesture.svg?style=flat)](https://cocoapods.org/pods/VD)
[![License](https://img.shields.io/cocoapods/l/VDGesture.svg?style=flat)](https://cocoapods.org/pods/VD)
[![Platform](https://img.shields.io/cocoapods/p/VDGesture.svg?style=flat)](https://cocoapods.org/pods/VD)

## Description
This repository contains new way to work with gestures

## Usage
```swift
view.add {
Gestures.Sequence {
Gestures.Press()
.onChange { context, _ in
print("change press: \(context.location)")
}

Gestures.Drag()
.when(in: someView)
}.onChange {
print("change")
}.onFinish {
print("on finish")
}
}
```
## Installation
1. [CocoaPods](https://cocoapods.org)

Add the following line to your Podfile:
```ruby
pod 'VDGesture'
```
and run `pod update` from the podfile directory first.

2. [Swift Package Manager](https://github.com/apple/swift-package-manager)

Create a `Package.swift` file.
```swift
// swift-tools-version:5.0
import PackageDescription

let package = Package(
name: "SomeProject",
dependencies: [
.package(url: "https://github.com/dankinsoid/VDGesture.git", from: "0.9.0")
],
targets: [
.target(name: "SomeProject", dependencies: ["VDGesture"])
]
)
```
```ruby
$ swift build
```

## Author

dankinsoid, voidilov@gmail.com

## License

VDGesture is available under the MIT license. See the LICENSE file for more info.