Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios PhoneGap上的儿童浏览器仅以纵向显示_Ios_Html_Cordova - Fatal编程技术网

Ios PhoneGap上的儿童浏览器仅以纵向显示

Ios PhoneGap上的儿童浏览器仅以纵向显示,ios,html,cordova,Ios,Html,Cordova,我正在使用适用于iOS 5.0、XCODE 4.2、phonegap 1.1.0的childbrowser,我只能在纵向模式下启动它。我的应用程序支持所有4个视图,但当我选择一个视图时,浏览器仅处于纵向模式。我确实收到了以下错误消息: 对于所有接口方向,视图控制器从-shouldAutorotateToInterfaceOrientation:返回NO。它应该至少支持一个方向 但我对xcode知之甚少-因此我无法修复此问题:( “帮助”我也遇到了同样的问题,如果您查看ChildBrowseSer

我正在使用适用于iOS 5.0、XCODE 4.2、phonegap 1.1.0的childbrowser,我只能在纵向模式下启动它。我的应用程序支持所有4个视图,但当我选择一个视图时,浏览器仅处于纵向模式。我确实收到了以下错误消息:

对于所有接口方向,视图控制器从-shouldAutorotateToInterfaceOrientation:返回NO。它应该至少支持一个方向

但我对xcode知之甚少-因此我无法修复此问题:(


“帮助”

我也遇到了同样的问题,如果您查看ChildBrowseService控制器,就会发现有一个名为shouldAutorotateToInterfaceOrientation的函数

前几行查看支持方向的配置,但只有在有多个方向设置的情况下,它才会旋转。我只有横向正确设置,所以它没有这样做

如果将“自动旋转”设置为“是”或注释掉“如果”块,它将检查当前方向是否受支持,如果受支持,它将旋转到当前方向

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 
{
    //BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported
    //if (autoRotate)
    //{
        if ([self.supportedOrientations containsObject:
             [NSNumber numberWithInt:interfaceOrientation]]) {
            return YES;
        }
    //}

    return NO;
}