Gestures
Add recognizers
let view = UIView()
view.recognize(.tap) { _ in
// handle tap
}
view.recognize(.swipe(.left)) { (_) in
// handle left swipe
}
// Or use target/selector
view.recognize(.edgeScreenPan(.left), target: self, action: #selector(handleEdgePan))
// If you need any additional setup...
view.recognize(.panSetup(minimumNumberOfTouches: 1, maximumNumberOfTouches: 4)) { (_) in
// ...
}
Installation
Gestures is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Gestures'
Author
Serge Vysotsky
License
Gestures is available under the MIT license. See the LICENSE file for more info.