Last active
August 29, 2015 14:25
-
-
Save lordhumunguz/ef0ba07f50a8f4e79a6c to your computer and use it in GitHub Desktop.
[iOS] Add Tap Gesture Recognizer
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
// confirm to the tap gesture recognizer delegate | |
func addTapGestureRecognizerForPausingWorkout() { | |
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: "workoutVideoTapped:") | |
tapGestureRecognizer.numberOfTapsRequired = 1 | |
tapGestureRecognizer.delegate = self | |
self.view.addGestureRecognizer(tapGestureRecognizer) | |
} | |
func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool { return true } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment