Permalink
Browse files

Added final check to make sure a tap was not misinterpreted. Fixed pr…

…ovided by horaceho.
  • Loading branch information...
1 parent 7d09f6e commit 8d797adc189d55bea746d640e5d32467a257daaf @kirbyt committed Dec 5, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 KTOneFingerRotationGestureRecognizer.m
@@ -69,7 +69,12 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
- [self setState:UIGestureRecognizerStateEnded];
+ // Perform final check to make sure a tap was not misinterpreted.
+ if ([self state] == UIGestureRecognizerStateChanged) {
+ [self setState:UIGestureRecognizerStateEnded];
+ } else {
+ [self setState:UIGestureRecognizerStateFailed];
+ }
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event

0 comments on commit 8d797ad

Please sign in to comment.