Latest 1.0.0
Homepage https://github.com/dclelland/CXTapGestureRecognizer
License MIT
Platforms ios 7.0, requires ARC
Authors

UILongPressGestureRecognizer subclass that takes much of the effort out of recognizing taps.

CXTapGestureRecognizer *gestureRecognizer = [[CXTapGestureRecognizer alloc] init];
gestureRecognizer.delegate = self;
[self.view addGestureRecognizer:gestureRecognizer];

✓ Delegate protocol methods for start, update, cancel, and finish.

- (void)tapGestureRecognizerDidStart:(CXTapGestureRecognizer *)gestureRecognizer
{
    NSLog("Gesture recognizer started");
}

- (void)tapGestureRecognizerDidUpdate:(CXTapGestureRecognizer *)gestureRecognizer
{
    NSLog("Gesture recognizer updated");
}

- (void)tapGestureRecognizerDidCancel:(CXTapGestureRecognizer *)gestureRecognizer
{
    NSLog("Gesture recognizer cancelled");
}

- (void)tapGestureRecognizerDidFinish:(CXTapGestureRecognizer *)gestureRecognizer
{
    NSLog("Gesture recognizer finished");
}

✓ Delegate method for cancellation.

- (BOOL)tapGestureRecognizerShouldCancel:(CXSwipeGestureRecognizer *)gestureRecognizer
{
    return YES;
}

Full API:

CXSwipeGestureRecognizerDelegate

- (void)tapGestureRecognizerDidStart:(CXTapGestureRecognizer *)gestureRecognizer;
- (void)tapGestureRecognizerDidUpdate:(CXTapGestureRecognizer *)gestureRecognizer;
- (void)tapGestureRecognizerDidCancel:(CXTapGestureRecognizer *)gestureRecognizer;
- (void)tapGestureRecognizerDidFinish:(CXTapGestureRecognizer *)gestureRecognizer;

- (BOOL)tapGestureRecognizerShouldCancel:(CXTapGestureRecognizer *)gestureRecognizer;

CXSwipeGestureRecognizer : UILongPressGestureRecognizer

@property (unsafe_unretained) id <CXTapGestureRecognizerDelegate> delegate;

Latest podspec

{
    "name": "CXTapGestureRecognizer",
    "version": "1.0.0",
    "summary": "UIGestureRecognizer subclass that takes much of the effort out of recognizing taps.",
    "homepage": "https://github.com/dclelland/CXTapGestureRecognizer",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Daniel Clelland": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dclelland/CXTapGestureRecognizer.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "ios": {
        "source_files": "CXTapGestureRecognizer/*.{h,m}"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This