Question

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!

Was it helpful?

Solution

Should work

[[CCDirector sharedDirector] presentViewController:browserVC animated:YES completion:nil];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top