title: How to call UIViewController from cocos2d-x?
body: <p>How to call UIViewController from cocos2d-x?<br></p>
  
  <p>I develop my app in cocos2d-x(C++). For iOS &amp; Android, I have to write native code.(Objective-c,java).</p>
  
  <p>I want to call UIViewController.The following code crash.</p>
  
  <pre><code>void NativeLauncher::CallMyViewController(){
      UIViewController *myViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
      QRViewController *newViewController = [[MainViewController alloc]initWithNibName:@"MainViewController" bundle:nil];
      [myViewController presentViewController: newViewController animated:YES completion: nil];//crash
  }
  </code></pre>
  
  <p><br>
  Anyone know how to do?</p>