0
votes

I'm building a cocos2d game which is supposed to be in portrait mode. I changed the RootViewController.m to portrait mode:

 return ( UIInterfaceOrientationIsPortrait( interfaceOrientation ) );

Everything works fine, both on the simulator and on my iPad. However, when I run the game on my iPhone, it defaults back to landscape mode.

Any ideas on how to fix this?

Thanks.

1

1 Answers

0
votes

in ur app delegate.. Put this line:

[director setDeviceOrientation:kCCDeviceOrientationPortrait];

after

[director setAnimationInterval:1.0/30];
[director setDisplayFPS:YES];