Cocos2D与iOS6错误旋转 [英] Cocos2D with iOS6 faulty rotation

查看:98
本文介绍了Cocos2D与iOS6错误旋转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个使用cocos2D的应用程式。
我使用iOS 5开发了我的应用程序,现在当我使用iOS 6模拟器测试时,整个应用程序被旋转。我的应用程序应该是横向模式,但iOS 6旋转到纵向。
任何建议都会有帮助!谢谢!

I am building an app which uses cocos2D. I developed my app using iOS 5 and now when I test with the iOS 6 simulator, the entire app is rotated. My app is supposed to be in landscape mode, but iOS 6 rotates it to portrait. Any advice would help! Thanks!

推荐答案

iOS6更改了如何处理视图旋转。模板项目已更新并显示如何更新项目。

iOS6 changed how to handle view rotation. The template projects have been updated and show how to update your project. There is more to it than just changing the addSubview to setRootViewController if you want to handle it correctly.

Cocos2d 2.0

https://github.com/cocos2d/cocos2d-iphone/blob/develop-v2/templates/Xcode4_templates/cocos2d%20iOS.xctemplate/AppDelegate.m

Cocos2d 1.1

https://github.com/cocos2d/cocos2d-iphone/blob/develop/templates/Xcode4_templates/cocos2d.xctemplate/AppDelegate.m

这篇关于Cocos2D与iOS6错误旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆