1

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:

enter image description here

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?

Bhanu
  • 1,249
  • 10
  • 17
thejaz
  • 2,763
  • 2
  • 26
  • 40
  • Check out this link: http://stackoverflow.com/questions/4264072/how-to-hide-status-bar-in-iphone-application – Abdullah Shafique Jul 05 '13 at 13:48
  • I know how to hide the status bar, and as I said in the question the status bar is actually hidden but the view controller doesn't occupy the space as it should. Please see the image. – thejaz Jul 05 '13 at 14:02

0 Answers0