1
votes

I am developing box2d game. My game uiinterfaceOrientation is UIInterfaceOrientationLandscapeLeft, it working fine in ios5.1 but ios6.0 i am getting interfaceorientation problem. I know – shouldAutorotateToInterfaceOrientation: Deprecated in iOS 6.0. For interfaceOrientation they give like interface orientations are set toUIInterfaceOrientationMaskAll for the iPad idiom and UIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom. I don't know how to use this(UIInterfaceOrientationMaskAll). I need game in UIInterfaceOrientationLandscapeLeft. How to solve this problem can you tell me .. Thanks..

2

2 Answers

2
votes

Here is a link to a blog about the new functions.

For your needs all you need to add is:

-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscapeLeft;}

That will make it so you are only allowed to run landscape left.

0
votes

Also you should add UIInterfaceOrientationLandscapeLeft in UISupportedInterfaceOrientations and UIInterfaceOrientationproperty in Info.plist. You can also prevent further autorotation by clearly returning false from shouldAutorotate callback.