cocos2d-x 2.0+,IOS6.0+设置横屏

1. 在项目 Summary 中,勾选上 Landscape left,以及 Landscape Right(若是须要),只设置第1步就运行会报错,还需要设置第2步。

2. 在 RootViewController.mm 中,若没有下面两个函数,则添加;若有,则修改第一个函数:

-(NSUInteger)supportedInterfaceOrientations

{

    return UIInterfaceOrientationMaskLandscape;

//    return UIInterfaceOrientationMaskPortrait;//注释掉此行

}

-(BOOL)shouldAutorotate

{

    return YES;

}

猜你喜欢

转载自ray1217.iteye.com/blog/1997654
今日推荐