Reputation: 42157
I am presenting a UIImagePickerController
on iPad with UIImagePickerControllerSourceTypeCamera
. I know that the other UIImagePickerControllerSourceType
options need to be presented in a UIPopoverController
, but I doubt the camera should be.
That being said, I am presenting the camera from a modal view controller that is presented as a formSheet
. Sometimes when I present the picker, it is shifted down a few pixels, like the status bar pushed it down:
Next, when I dismiss the picker, it has rotated my formSheet
modal to portrait mode, but the underlying UISplitViewController
is still in landscape:
What is happening here? Am I doing something wrong when presenting a UIImagePickerController
from a modal form sheet?
Upvotes: 3
Views: 1808
Reputation: 42157
I found out what the issue was. I had the following in my UINavigationController
subclass:
// Tell the system which initial orientation we want to have
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationPortrait;
}
Removing that fixed the issue!
Upvotes: 2