菜鸟教程小白 发表于 2022-12-12 22:56:41

iphone - Cocos2D 与 iOS6 错误旋转


                                            <p><p>我正在构建一个使用 cocos2D 的应用程序。
我使用 iOS 5 开发了我的应用程序,现在当我使用 iOS 6 模拟器进行测试时,整个应用程序都会旋转。我的应用程序应该处于横向模式,但 iOS 6 将其旋转为纵向模式。
任何建议都会有所帮助!谢谢!</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>iOS6 更改了处理 View 旋转的方式。模板项目已更新并显示如何更新您的项目。如果你想正确处理它,它不仅仅是将 addSubview 更改为 setRootViewController。</p>

<p><strong>Cocos2d 2.0</strong></p>

<p> <a href="https://github.com/cocos2d/cocos2d-iphone/blob/develop-v2/templates/Xcode4_templates/cocos2d%20iOS.xctemplate/AppDelegate.m" rel="noreferrer noopener nofollow">https://github.com/cocos2d/cocos2d-iphone/blob/develop-v2/templates/Xcode4_templates/cocos2d%20iOS.xctemplate/AppDelegate.m</a> </p>

<p><strong>Cocos2d 1.1</strong></p>

<p> <a href="https://github.com/cocos2d/cocos2d-iphone/blob/develop/templates/Xcode4_templates/cocos2d.xctemplate/AppDelegate.m" rel="noreferrer noopener nofollow">https://github.com/cocos2d/cocos2d-iphone/blob/develop/templates/Xcode4_templates/cocos2d.xctemplate/AppDelegate.m</a> </p></p>
                                   
                                                <p style="font-size: 20px;">关于iphone - Cocos2D 与 iOS6 错误旋转,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/12681813/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/12681813/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iphone - Cocos2D 与 iOS6 错误旋转