Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/93.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关闭单页自动旋转iPad不工作?_Ios_Xcode_Autorotate - Fatal编程技术网

iOS关闭单页自动旋转iPad不工作?

iOS关闭单页自动旋转iPad不工作?,ios,xcode,autorotate,Ios,Xcode,Autorotate,要求:只是不能自动旋转单个页面,去水平屏幕外总是进来水平屏幕,垂直屏幕外总是进来垂直屏幕 操作:在控制器本页面中写入shouldautorotate方法并返回否,查找所有iphone的工作都已达到要求,但iPad不工作 注意:请看,它是一个单一的、特定的页面,没有自动旋转,这是为了确保程序设置页面在多个方向上都被选中,并确保下拉设备沿着快捷菜单自动旋转打开 系统:iOS9我也有类似的案例。请注意,我没有使用导航控制器,它是一个简单的模态视图,这可能会影响旋转代码 在第一次查看我的申请时,我有:

要求:只是不能自动旋转单个页面,去水平屏幕外总是进来水平屏幕,垂直屏幕外总是进来垂直屏幕

操作:在控制器本页面中写入shouldautorotate方法并返回否,查找所有iphone的工作都已达到要求,但iPad不工作

注意:请看,它是一个单一的、特定的页面,没有自动旋转,这是为了确保程序设置页面在多个方向上都被选中,并确保下拉设备沿着快捷菜单自动旋转打开


系统:iOS9

我也有类似的案例。请注意,我没有使用导航控制器,它是一个简单的模态视图,这可能会影响旋转代码

在第一次查看我的申请时,我有:

-(BOOL)shouldAutorotate {
    return YES;
}
鉴于我想锁定某个方向(在我的例子中是横向),我没有使用shouldAutorotate,而是使用了这个:

-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape;
}

我也有类似的案例。请注意,我没有使用导航控制器,它是一个简单的模态视图,这可能会影响旋转代码

在第一次查看我的申请时,我有:

-(BOOL)shouldAutorotate {
    return YES;
}
鉴于我想锁定某个方向(在我的例子中是横向),我没有使用shouldAutorotate,而是使用了这个:

-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape;
}