Question: I have an iPhone 4S (running iOS 5.1) & an iPhone 5 (running iOS 6.1). I noticed that when i try to open the `cocos2D` game, on the iPhone 4S running 5.1, the game is able to open perfectly fine in landscape mode. 

However, when I try to open the same `cocos2D` game on my iPhone 5 running 6.1, the game is opened in portrait mode.

Is there any way that I can rotate the `cocos2D` game into landscape mode in the iPhone 5 running iOS 6.1.

Some extra notes:

* The game is being pushed from a view controller in my test app.
* Since I am pushing the game from an iOS app, I have to support portrait mode in the "Support Interface Orientations" section. (If I was just doing the game, I would just easily set the Support Interface Orientation to landscape left/landscape right)

I have also tried different methods such as for iOS 6 such as:

```
-(NSUInteger)supportedInterfaceOrientations
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
-(BOOL)shouldAutorotate

```

But it has given me different results when I tried those methods.

Ideally, I would like the app to be locked in the Portrait mode and game to be locked into Landscape mode. 

So, I'm wondering if it is possible to have an app that remains locked in the portrait mode and the game locked in landscape mode (for both iOS 5 & iOS 6) when opened?

Here's a link to a sample project I was working on:

<http://www.4shared.com/zip/yEAA1D_N/MyNinjaGame.html>

Answer: 
I just set the orientation modes in Xcode ("Summary" tab on your target) to landscape left and right. Then for every UIViewController I added this:

```
// Autorotation iOS5 + iOS6
- (BOOL)shouldAutorotateToInterfaceOrientation:    (UIInterfaceOrientation)toInterfaceOrientation {
    return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}

```
What I'm doing for landscape in my cocos2d game (on iOS 6.1):

```
//This is in the AppDelegate.m
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
//change to 'return UIInterfaceOrientationIsPortrait(interfaceOrientation);' for portrait
}

```