IOS 8 UIImagePickerController has a black landscape preview

I am developing an application for the iPad, in landscape mode, a black preview appears when shooting from the camera. At the same time, the UIImagePickerController works correctly in Portrait mode. Thanks in advance.

this is my piece of code -

-(UIImagePickerController *)imagePicker{ if(!imagePicker){ imagePicker = [[UIImagePickerController alloc]init]; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.delegate = self; } return imagePicker; } [self presentViewController:self.imagePicker animated:YES completion:^{ }]; 

PS: Does anyone know about the default "Contacts" application of the iOS application having this function, the rotation of the camera controls relative to the orientation of the device. Here, the camera preview looks great for the entire orientation. No one knows its implementation.

+5
source share
1 answer

if you use Autolayout, then first check the coordinates and size of the corresponding preview (UIimageview).

-1
source

Source: https://habr.com/ru/post/1208027/


All Articles