You’ll want to look at UISwipeGestureRecognizer. For help with getting swipe gesture recognizers working with Cocos2D, look here.
The short rundown is this:
- Set up your gesture recognizer (direction, number, selector/target).
- Attach gesture recognizer to the glView
- Set up event to fire when a swipe is detected. This is where you’ll do the jump up/down stuff.
- Tear down the gesture recognizer when you no longer need it.
A side note, a little bit of research does wonders. All of this information is available with a quick google search.
2
solved swipe and jump effects in iphone gaming with cocos2d and box2d [closed]