Adding a cocos2d view to a UIView

点点圈 提交于 2019-12-12 15:45:00

问题


I have integrated cocos2d 2.0 into an existing iOS project and would like to be able to create a view and add it to an existing view as a subview.

Where should the cocos2d setup code be placed and how is the cocos2d view then made visible inside the UIView?

I have followed Ray Wenderlichs tutorial and it doesn't help with the specific issue. A lot of the code is deprecated as well.

Is it possible to do the cocos2d setup inside the cocos2d class I create? Im not sure on how to connect the CCDirector and glView to the current architecture.

If I do the setup in the AppDelegate, what exactly is needed in the cocos2d view (CCLayer e.g.) and how is it made visible? The template uses a navigation controller, but I do not use that.

How is the cocos2d view linked to the setup, and who takes care of displaying the view?

来源:https://stackoverflow.com/questions/16938417/adding-a-cocos2d-view-to-a-uiview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!