Skip to content

Instantly share code, notes, and snippets.

@mczachurski
Created January 21, 2018 16:56
Show Gist options
  • Save mczachurski/626f5c8425f433e4accc0bfbb69c1f17 to your computer and use it in GitHub Desktop.
Save mczachurski/626f5c8425f433e4accc0bfbb69c1f17 to your computer and use it in GitHub Desktop.
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent) {
super.touchesEnded(touches, with: event)
if self.twoFingersMoveUp() {
self.fingersDirection = TwoFingersMove.moveUp
state = .ended
return
}
if self.twoFingersMoveDown() {
self.fingersDirection = TwoFingersMove.moveDown
state = .ended
return
}
state = .failed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment