Skip to content

CCGestureRecognizer

spalx edited this page Apr 29, 2013 · 13 revisions

CCGestureRecognizer is an abstract base class for gesture recognizer classes.

The subclasses of CCGestureRecognizer are the following:

  • CCTapGestureRecognizer
  • CCPinchGestureRecognizer
  • CCSwipeGestureRecognizer
  • CCPanGestureRecognizer
  • CCLongPressGestureRecognizer

Recognizing gestures on specific nodes

The frame of the CCNode object (sprite, layer, etc.) on which a gesture recognizer is added that's the space where the gesture recognizer is available. So if you add a gesture recognizer on a "screen-size" CCLayer you will be able to recognize the gesture everywhere on the screen.

Setting the target

Canceling touches on other nodes

Clone this wiki locally