xcode 4.6.3 用cocos2d-iphone+box2d模拟器设置竖屏问题
2013-10-21 20:25
281 查看
1,在AppDelegate.mm 文件中将下面的将注释掉
//-(NSUInteger)supportedInterfaceOrientations {
//
// // iPhone only
// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
// return UIInterfaceOrientationMaskLandscape;
// return UIInterfaceOrientationMaskPortrait;
// // iPad only
// return UIInterfaceOrientationMaskLandscape;
//}
//
//// Supported orientations. Customize it for your own needs
//// Only valid on iOS 4 / 5. NOT VALID for iOS 6.
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
//{
// // iPhone only
// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
// //return UIInterfaceOrientationIsLandscape(interfaceOrientation);
// return UIInterfaceOrientationIsPortrait(interfaceOrientation);
// //return UIInterfaceOrientationMaskAll;
// // iPad only
// // iPhone only
// return UIInterfaceOrientationIsLandscape(interfaceOrientation);
//
//}
2 、在info.plist
折磨了很久,版本不一样头疼。
//-(NSUInteger)supportedInterfaceOrientations {
//
// // iPhone only
// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
// return UIInterfaceOrientationMaskLandscape;
// return UIInterfaceOrientationMaskPortrait;
// // iPad only
// return UIInterfaceOrientationMaskLandscape;
//}
//
//// Supported orientations. Customize it for your own needs
//// Only valid on iOS 4 / 5. NOT VALID for iOS 6.
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
//{
// // iPhone only
// if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
// //return UIInterfaceOrientationIsLandscape(interfaceOrientation);
// return UIInterfaceOrientationIsPortrait(interfaceOrientation);
// //return UIInterfaceOrientationMaskAll;
// // iPad only
// // iPhone only
// return UIInterfaceOrientationIsLandscape(interfaceOrientation);
//
//}
2 、在info.plist
折磨了很久,版本不一样头疼。
相关文章推荐
- Cocos2D-x 用CCControlSlider设置调节音量的大小
- Cocos2d-x Sprite 执行 CCFade~ 这类透明度变化动作的一些问题
- cocos2d-x+lua+cocosbuilder+luaproxy开发中遇到的读取子node以及事件绑定问题
- cocosBuilder + cocos2d-x-LuaProxy 解决在CCB编辑器中的label的多国语言文本替换
- 根据CocosBuilder文件自动生成代码
- cocos2d-x2.1 + cocosbuilder3.0 的自动生成C++类的修改
- 如何在xcode下面同时安装cocos2d-iphone 和 cocos2d-x模板,其实是因为很喜欢C++的缘故,当时学习的是前者,现在自己摸着石头过河了就(cocos2d-x安装失败 出错)
- 关于cocos2d-x中的动画类
- 对于cocos2d-x中的场景切换
- cocos2d-x中的文字显示
- cocos2d-x的初步学习二十五之连连看一
- Cocos2d-x之LUA脚本引擎深入分析
- cocos2d-x 中android程序调试几种出错情况收集
- cocos2dx教程之多点触控的实现
- cocos2d-x 使用plugin
- cocos2dx教程之CCLayer事件
- cocos2dx教程之CCLayerMultiplex
- cocos2dx教程之CCLayerGradient
- cocos2dx教程之CCLayerColor
- Cocos2d-x项目开发时在Eclipse中配置环境编译C++