简体   繁体   中英

How can you show an MCBrowserViewController on a scene in cocos2d?

I'm porting a code to ios7 in wich I used old GKPeerPickerController and cocos2d to make a multiplayer game over Bluetooth. In the new version, I'm using the MCBrowserViewController, but im unable to show it on the scene.

Im calling it with

[[[CCDirector sharedDirector] view] addSubview: browserVC];

where browserVC is an initiallized MCBrowserViewController but as this is only to show UIViews I get the error

Cannot initialize a parameter of type 'UIView *' with an rvalue of type 'MCBrowserViewController *'

Is there any way to show the MCBrowserViewController on the scene? Thanks in advance!

应该管用

[[CCDirector sharedDirector] presentViewController:browserVC animated:YES completion:nil];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM