Skip to content

Instantly share code, notes, and snippets.

@chrishulbert
Created June 21, 2011 05:07
Show Gist options
  • Select an option

  • Save chrishulbert/1037281 to your computer and use it in GitHub Desktop.

Select an option

Save chrishulbert/1037281 to your computer and use it in GitHub Desktop.
Baby tap gesture - like UITapGestureRecognizer but accepts any number of fingers
// BabyTapGesture.h
// Created by Chris ([email protected]) on 21/06/11.
#import <Foundation/Foundation.h>
#import <UIKit/UIGestureRecognizerSubclass.h>
@interface BabyTapGesture : UIGestureRecognizer
@end
----
// BabyTapGesture.m
// Created by Chris ([email protected]) on 21/06/11.
#import "BabyTapGesture.h"
@implementation BabyTapGesture
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
self.state = UIGestureRecognizerStateRecognized;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment