kalpesh
kalpesh

Reputation: 1287

How to load native IOS xib using cocos2d-js?

I am trying to load xib view for particular scene in cocos2d-js for cross plate form. because of some of the functionality does not available in cocos2d-js so i am trying to load xib. In short some times i want to run scene and some times i want to load xib. please help me how to do it?

Upvotes: 1

Views: 61

Answers (1)

Janvi Trivedi
Janvi Trivedi

Reputation: 10

-(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];
}

Upvotes: 1

Related Questions