Skip to content

Instantly share code, notes, and snippets.

@jen2
Created May 7, 2017 23:53
Show Gist options
  • Save jen2/e86b04b5da37fa5a37483a51e5472abe to your computer and use it in GitHub Desktop.
Save jen2/e86b04b5da37fa5a37483a51e5472abe to your computer and use it in GitHub Desktop.
"Make a Custom UIGestureRecognizer in Objective-C" Touches Ended & Cancelled Methods.
-(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