且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS 8 自动旋转将图像旋转到屏幕外

更新时间:2023-11-21 13:49:46

我在编译ios8的时候也遇到了cocos1.0的问题.在我的代码中,我发现我确实有一个 UIViewController 用作根视图控制器(它的子视图位于 Cocos2D 使用的 EAGLView 中).

I've got the issue with cocos1.0 as well when I compile for ios8. In my code I found that I did have a UIViewController that is used as the root view controller (its child is in the EAGLView used by Cocos2D).

我找到的解决方法是从我的 UIViewController 中注释以下方法

The fix I found is to comment the following method from my UIViewController

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

我已经在ios8和ios7上做了快速测试,它可以工作

I've done quick test on ios8 and ios7, and it works