如何使用cocos2d-js加载本机IOS xib?

时间:2015-09-07 06:42:42

标签: javascript ios cocos2d-iphone cocos2d-x cocos2d-js

我正在尝试为cocos2d-js中的特定场景加载xib视图以用于跨板形式。因为cocos2d-js中没有一些功能所以我试图加载xib。总之,有时我想运行场景,有时我想加载xib。请帮我怎么做?

1 个答案:

答案 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];
}