SubViews with Cocos2d
I have a helloworld scene that I would like to add a subview to.
How is this done in cocos2d? I want to add a subview near the lower part of screen.
I want this view to be controlled by the helloworld scene, hiding and showing the subview as needed.
How is this done in cocos2d?
Thank开发者_高级运维s
Add the subview (probably CCLayer) as a child to the hello world scene.
CCLayer* subview = //initialize
[subview setPosition:ccp(X,Y)];
[self addChild:subview];
You can add a CCLayer
as a child to the CCScene or to the main CCLayer inside of it.
精彩评论