Search code examples
xcodeperformancecocos2d-iphonecore-animation

Can we use CoreAnimation in Cocos2d?


so I would like to know if it is possible to use Core Animation in Cocos2d ( like adding CABAsicAnimation to the code) . how can I do it please ? And if yes , will it affect performance ? thank you .:) sorry for my english I'm french :/


Solution

  • You can mix a UIKit view with Cocos2D view, and since all UIViews support Core Animation, you can have the two on the screen at the same time.

    Look at your viewController and notice how the Cocos scene is setup as a subview. Just add another subview to the view controller and the two can exist onscreen at once and you can move between them and do whatever manipulation you want.