Created
May 7, 2017 23:53
-
-
Save jen2/e86b04b5da37fa5a37483a51e5472abe to your computer and use it in GitHub Desktop.
"Make a Custom UIGestureRecognizer in Objective-C" Touches Ended & Cancelled Methods.
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)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event | |
{ | |
[super touchesEnded:touches withEvent:event]; | |
[self reset]; | |
} | |
-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event | |
{ | |
self.state = UIGestureRecognizerStateCancelled; | |
[self reset]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment