I'm having a UISplitViewController
as root in my story board. The detail view controller is showing an pop over with a view controller embedded in a navigation controller.
I have a button in the pop over view controller that is showing the UIImagePickerController
with UIImagePickerControllerSourceTypeCamera
as source:
[self.controller presentViewController:self.imagePickerController animated:YES completion:nil];
The status bar disappears but there is still a black bar in the status bar area and the UIImagePickerController
starts below the status bar. But it is still in full screen height so it is getting cut in the toolbar Here is an image:
If I rotate the screen it jumps to full screen, but then when I dismiss the UIImagePickerController
the UISplitViewController
is suddenly behind and partly covered by the status bar. But when I rotate it again, the UISplitViewController
jumps back to being below the status bar and everything is fine again.
If I instead of the view controller in the pop over present the UIImagePickerViewController
from the root view controller like this:
[self.window.rootViewController presentViewController:self.imagePicker animated:YES completion:nil];
Then it gets full screen like it should, but the pop over appears in front of the UIImagePickerViewController
.
(1) Why isn't the full screen presentation of the UIImagePickerViewController
working like it should?
(2) Why is the pop over above the UIImagePickerViewController
when I show it from the root view controller?
(3) What is the proper way to solve this?