开发者

cocos2d as part of a larger iphone app?

Is it possible to have cocos2d as part of a larger app? Say I had 4 tabs in an app, the first 3 开发者_开发技巧were just regular UIKit stuff. Could I somehow put a cocos2d game in the 4th tab? How?


It shouldn't be a problem. Looking at how Cocos2d are making a game view, I found this in my appdelegate:

[viewController setView:glView];
[window addSubview: viewController.view];

I would just guess that you would have to make a viewcontroller for your game, and plain old Apple-style views for the others.

Good luck! Please post here if you get it to work!

(Remember that it calls "viewController.wantsFullScreenLayout = YES;" in the AppDelegate, so this would hide your tab bar. Make a quit option or set view-rect)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜