title: How Can I add Shake Gesture in Cocos2d CCLayer?
body: <p>I've tried using <a href="http://www.cocos2d-iphone.org/forum/topic/12216">shake Gesture Recognition wrapper</a> to detect the shake gesture. 
  I've also tried to implement the code suggested in the <a href="http://www.youtube.com/watch?v=3kIEOW_7dIw">Geeky Lemon</a>.
  But I am unable to handle the shake gesture. Is there any way to get the shake gesture recognized?</p>
  
  <p>Thank you! </p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>The code is done by the help of the shake Gesture Recognition wrapper demo.</p>
  
  <p>in the init method</p>
  
  <pre><code>ShakeDispatcher * dispatcher = [ShakeDispatcher sharedInstance];
  [dispatcher addShakeListener:self];    
  [[[CCDirector sharedDirector]view] addGestureRecognizer:dispatcher];
  
  -(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event {  
      if ( event.subtype == UIEventSubtypeMotionShake ){      
          NSLog(@"Shake detected");   
      } 
  }
  </code></pre>