应用本身只支持竖屏,并且关闭了自动旋转
更新到ios16后,调用系统相册弹出后,由竖屏自动变成了横屏,调用相机也会切换横屏,并且按钮都不见了无法返回只能退出app。
解决:
self.ImagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.ImagePicker.allowsEditing = YES;
self.ImagePicker.modalPresentationStyle = UIModalPresentationPageSheet;
UIViewController *rootViewController = UnityGetGLViewController();
[rootViewController presentViewController:self.ImagePicker animated:YES completion:nil];
设置 self.ImagePicker.modalPresentationStyle = UIModalPresentationPageSheet;
缺点 弹出的窗口不是全屏。