iPad模拟器6.0页面方向不起作用



我最近将xcode升级到安装了iPad 6.0的4.5。现在,当我在其中运行PhoneGap html5应用程序时,模拟器内的页面没有旋转,它正在使用早期版本的xcode。当我将模拟器从纵向更改为横向时,应用程序的 html 页面保持纵向,它不会使用模拟器旋转到横向。

这个解决方案对我有用:

编辑应用代表:

找到:[self.window addSubview:self.viewController.view];

替换为以下代码:

self.window.rootViewController = self.viewController;

如果您仍在显示状态栏,则在里面:MainViewController.m:

后 [超级视图确实加载];

// Do any additional setup after loading the view from its nib.

self.webView.frame = CGRectMake ( 0, 15, self.view.frame.size.width, self.view.frame.size.height-15);

可能不是最好的解决方案,但它对我有用!

最新更新