Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/100.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 如何判断UIImagePickerController cameraOverlayview是否会旋转?_Ios_Overlay_Uiimagepickercontroller_Uiinterfaceorientation - Fatal编程技术网

Ios 如何判断UIImagePickerController cameraOverlayview是否会旋转?

Ios 如何判断UIImagePickerController cameraOverlayview是否会旋转?,ios,overlay,uiimagepickercontroller,uiinterfaceorientation,Ios,Overlay,Uiimagepickercontroller,Uiinterfaceorientation,Ipad上的IOS 6在横向模式下旋转UIImagePickerController cameraOverlayView,但iPhone3GS上的IOS 6没有-谢谢苹果 我不知道IOS 5或其他设备的行为,因此有没有一种方法可以预测这种行为,以便我可以在覆盖视图上应用旋转变换 谢谢我也有这个问题。以下是我的发现: 在Target的“iPad部署信息”配置中,确保您启用了“横向左侧”和“横向右侧”模式,即使您的应用程序并不真正支持这些模式(显然,这也可以通过Info.plist文件实现) 接下

Ipad上的IOS 6在横向模式下旋转UIImagePickerController cameraOverlayView,但iPhone3GS上的IOS 6没有-谢谢苹果

我不知道IOS 5或其他设备的行为,因此有没有一种方法可以预测这种行为,以便我可以在覆盖视图上应用旋转变换


谢谢

我也有这个问题。以下是我的发现:

在Target的“iPad部署信息”配置中,确保您启用了“横向左侧”和“横向右侧”模式,即使您的应用程序并不真正支持这些模式(显然,这也可以通过Info.plist文件实现)

接下来,在您的
UIViewController
(s)中,强制它们纵向:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}

- (BOOL)shouldAutorotate
{
    return YES;
}

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}

现在,当iPad旋转到横向时,
UIImagePickerController
应该可以正确旋转,但是您的
UIViewController
仍然是纵向的。

我也有这个问题。以下是我的发现:

在Target的“iPad部署信息”配置中,确保您启用了“横向左侧”和“横向右侧”模式,即使您的应用程序并不真正支持这些模式(显然,这也可以通过Info.plist文件实现)

接下来,在您的
UIViewController
(s)中,强制它们纵向:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}

- (BOOL)shouldAutorotate
{
    return YES;
}

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}

现在,当iPad旋转到横向时,
UIImagePickerController
应该可以正确旋转,但是您的
UIViewController
仍然只能是纵向的。

对不起,这并不能解决覆盖层不旋转的问题,而且只能在iphone上!谢谢你的输入。对不起,这并不能修复覆盖层不旋转的问题——而且只能在iphone上!谢谢你的意见。