PhoneGap 上的 childBrowser 仅以纵向显示
我正在使用适用于 iOS 5.0、XCODE 4.2、phonegap 1.1.0 的 childbrowser,并且只能在纵向模式下将其拉出。我的应用程序支持所有 4 个视图,但当我选择一个视图时,浏览器仅处于纵向模式。我确实收到此错误消息:
对于所有界面方向,视图控制器从 -shouldAutorotateToInterfaceOrientation: 返回 NO。它应该支持至少一种方向。
但我对 xcode 知之甚少 - 所以我无法解决这个问题:(
帮助
I'm using childbrowser for iOS 5.0, XCODE 4.2, phonegap 1.1.0 and I'm only able to pull it up in portrait mode. My app supports all 4 views but when I select a, I get the browser in portrait mode only. I do get this error message:
The view controller returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
But i know very little xcode - so I'm not able to fix this :(
help
我也遇到了同样的问题,如果你在 ChildBrowserViewController 中查看,有一个名为 shouldAutorotateToInterfaceOrientation 的函数。
前几行查看支持的方向的配置,但只有当您有多个方向设置时它才会旋转。我只有横向正确设置,所以它没有做到这一点。
如果将 autoRotate 设置为 YES 或注释掉 if 块,它将检查是否支持当前方向,如果支持,它将旋转到该方向。
I had the same issue, if you look in ChildBrowserViewController there is a function called shouldAutorotateToInterfaceOrientation.
The first couple of lines look at the configuration of supported orientations, but it will only rotate if you have more than one orientation setup. I only had landscape right setup so it didn't do it.
If you set the autoRotate to YES or comment out the if block, it will check that the current orientation is supported, and if it is it will rotate to it.