Created
May 7, 2017 23:36
-
-
Save jen2/953a590707fe1c9e9ed3434c61f82dd2 to your computer and use it in GitHub Desktop.
"Make a Custom UIGestureRecognizer in Objective-C" Touches Began Method.
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
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
[super touchesBegan:touches withEvent:event]; | |
self.strokePrecision = 10.0; //A | |
if (touches.count > 1) { | |
self.state = UIGestureRecognizerStateFailed; // B | |
return; | |
} | |
self.firstTap = [touches.anyObject locationInView: self.view.superview]; //C | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment