我正在尝试为cocos2d-js中的特定场景加载xib视图以用于跨板形式。因为cocos2d-js中没有一些功能所以我试图加载xib。总之,有时我想运行场景,有时我想加载xib。请帮我怎么做?
答案 0 :(得分:1)
-(IBAction)LoadNativeXib:(id)sender
{
cocos2d::Director::getInstance()->pause();
cocos2d::Director::getInstance()->stopAnimation();
CocosDenshion::SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
CocosDenshion::SimpleAudioEngine::getInstance()->pauseAllEffects();
//here you can load native xib
[self.navigationController popViewControllerAnimated:YES];
// OR
[self.view addSubview:_viewIos];
}