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

Ipad上的IOS 6在横向模式下旋转UIImagePickerController cameraOverlayView,但iPhone 3GS上的IOS 6没有 – 谢谢苹果!

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

谢谢

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

在Tar​​get的“iPad部署信息”configuration中,请确保已经启用了“左侧风景”和“右侧风景”模式 – 即使您的应用程序不支持这些模式(这也可以通过info.plist文件来完成,显然)。

在这里输入图像说明

接下来,在你的UIViewController (s),强制他们肖像:

 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return UIInterfaceOrientationIsPortrait(interfaceOrientation); } - (BOOL)shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown; } 

现在, UIImagePickerController应该正确旋转,当iPad旋转到风景 – 但你的UIViewController仍然是仅肖像。