Created
June 1, 2019 06:39
-
-
Save aybekckaya/e4f71b1618372f1ee0e7a08b325c4096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LikeGestureRecognizer:UIGestureRecognizer { | |
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent) { | |
super.touchesBegan(touches, with: event) | |
self.state = .began | |
} | |
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent) { | |
super.touchesMoved(touches, with: event) | |
self.state = .changed | |
} | |
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent) { | |
super.touchesEnded(touches, with: event) | |
self.state = .ended | |
} | |
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent) { | |
super.touchesCancelled(touches, with: event) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment