Ios 首次进入相机时UIImagePickerController上的UI方向错误

Ios 首次进入相机时UIImagePickerController上的UI方向错误,ios,objective-c,ipad,uiimagepickercontroller,Ios,Objective C,Ipad,Uiimagepickercontroller,我第一次在iPad上进入相机时,UIImagePickerController上的UI方向错误。设备位于横向,但UIImagePickerController位于纵向 设备旋转后,一切正常-UIImagePickerController获得正确的UI方向 我有 - (UIInterfaceOrientationMask)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll; } 及 好的,我找到了答

我第一次在iPad上进入相机时,UIImagePickerController上的UI方向错误。设备位于横向,但UIImagePickerController位于纵向

设备旋转后,一切正常-UIImagePickerController获得正确的UI方向

我有

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
   return UIInterfaceOrientationMaskAll; 
}

好的,我找到了答案

演示控制器(UIViewController)有一个名为modalPresentationStyle的属性,它被设置为
UIModalPresentationFullScreen
。 要解决我的问题,我只需将其设置为
UIModalPresentationOverFullScreen

presentingController.modalPresentationStyle = UIModalPresentationOverFullScreen;

仅此而已。

Info.plist?@IgorKulagin中设置了哪些
支持的界面方向?
在设备旋转后,一切正常并按预期工作。因此,Info.plist中有4个受支持的接口方向。
presentingController.modalPresentationStyle = UIModalPresentationOverFullScreen;