Cocos2D is a great iOS game framework, and there are several wrappers out there for adding functionality contained within the UIKit into Cocos2D games.
Shortly after gesture recognizers were added to the iOS SDK some wrapper code was released so Cocos2D developers could use gesture recongizers within their games, but this required using a different syntax, and modifying Cocos2D code.
Today I came across a nice category from Krystof Zablocki that can be used with CCNode in both Cocos2D for adding gesture recognizers in Cocos2D games while using the same syntax as a UIGestureRecognizer.
The code works in Cocos2D versions 1 and V2.
You can read more about the category on Kryztof’s website here.
You can find the category and an example project on Github here.
Added to the Cocos2D tutorial and example page.
©2012 iPhone, iOS 5, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
.






