如何在ios6上制作横向cocos2dv2.0游戏?

如何在ios6上制作横向cocos2dv2.0游戏?,ios,cocos2d-iphone,landscape,Ios,Cocos2d Iphone,Landscape,从几个月前开始,我一直在做一些游戏。我很好地将它们迁移到了cocos2dv2.0,但昨天我尝试创建了一个新的,无论我对目标设置旋转做了什么,我都只能在纵向中获得它 如何创建新的游戏环境?在AppDelegate类中搜索supportedInterfaceOrientations函数并将其更改为环境。如果未找到此函数,则添加它 -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLa

从几个月前开始,我一直在做一些游戏。我很好地将它们迁移到了cocos2dv2.0,但昨天我尝试创建了一个新的,无论我对目标设置旋转做了什么,我都只能在纵向中获得它


如何创建新的游戏环境?

在AppDelegate类中搜索supportedInterfaceOrientations函数并将其更改为环境。如果未找到此函数,则添加它

-(NSUInteger)supportedInterfaceOrientations 
{
    return UIInterfaceOrientationMaskLandscape;
}

我只是通过更改addSubview行来修复它:

[window_ addSubview:navController_.view];


想知道为什么没有这样的方法,最接近的方法是
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{return UIInterfaceOrientationIsLandscape(interfaceOrientation);}
,添加您建议的方法也不会起作用:(应该自动旋转指针FaceOrientation适用于iOS5及以下版本。.在iOS6中,它支持接口方向。是的,我知道,但我按照您的建议做了,它没有修复。在xcode摘要页面中,您还可以设置横向?为什么您不能将sdk更新为cocos2d 2.1?或者只需下载并在appDelegate中查看代码并复制:-
[window_ setRootViewController:navController_];