Created
June 15, 2011 06:06
-
-
Save dimitribouniol/1026575 to your computer and use it in GitHub Desktop.
Simple property to check if a UIGestureRecognizer is tracking (like UIControl).
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
#import <UIKit/UIKit.h> | |
@interface UIGestureRecognizer (DBTrackingAdditions) | |
@property (nonatomic, readonly, getter=isTracking) BOOL tracking; | |
@end |
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
#import "UIGestureRecognizer+DBTrackingAdditions.h" | |
@implementation UIGestureRecognizer (DBTrackingAdditions) | |
- (BOOL)isTracking | |
{ | |
return (self.state == UIGestureRecognizerStateBegan || self.state == UIGestureRecognizerStateChanged); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment