Reputation: 1229
Can anyone tell me the best way to add a viewcontroller with nib file to a cocos2d scene?
Thanks
Upvotes: 0
Views: 1116
Reputation: 1229
actually it is..
[[[CCDirector sharedDirector] openGLView] addSubview:myView];
Upvotes: 3
Reputation: 839
UIView can be added to another UIView but not to cocos2d scene (CCScene). You can use openGLView from CCDirector class for your purpose.
[[CCDirector sharedDirector].openGLView addSubView:yourView]
Upvotes: 1