title: cocos2d-iOS - Gesture recognisers
body: <p>Has anyone managed to get the gesture recognition working in cocos-2d?</p>
  
  <p>I have read a post here that claimed to have achieved it, here: <a href="http://www.cocos2d-iphone.org/forum/topic/8929" rel="noreferrer">http://www.cocos2d-iphone.org/forum/topic/8929</a></p>
  
  <p>I patched from the git hub here: <a href="https://github.com/xemus/cocos2d-GestureRecognizers/blob/master/README" rel="noreferrer">https://github.com/xemus/cocos2d-GestureRecognizers/blob/master/README</a></p>
  
  <p>I made a subclass of <code>CCSprite</code> (which is a subclass of <code>CCNode</code>):</p>
  
  <pre><code>-(id) initWithTexture:(CCTexture2D*)texture rect:(CGRect)rect {
  if( (self=[super initWithTexture:texture rect:rect]) )
  {
      CCGestureRecognizer* recognizer;
      recognizer = [CCGestureRecognizer 
          CCRecognizerWithRecognizerTargetAction:[[[UITapGestureRecognizer alloc]init] autorelease] 
                    target:self 
                    action:@selector(tap:node:)];
      [self addGestureRecognizer:recognizer];
  }
  return self;
  }
  </code></pre>
  
  <p>Delegate method:</p>
  
  <pre><code>- (void) swipe:(UIGestureRecognizer*)recognizer node:(CCNode*)node
  {
  NSLog(@" I never get called :( ");
  }
  </code></pre>
  
  <p>My tap event never gets called.  </p>
  
  <p>Has anyone got this working?  How difficult is it to do gesture recognition manually for swipe detection?</p>