landscape mode not working for ipad converted app - iphone

I am making my application universal for iPad. Everything works great for iphone but when I run it in the ipad simulator in landscape mode the navigation bar is missing from my uinavigation view and every view is shifted up by about 30 pixels.
Any idea what is going on?

Print the navigation bar frame and also check the orientation methods.

Related

How do I force my launch storyboard to appear in portrait on the iPhone?

My app supports only iPhone, and the three default orientations (portrait, landscape left, landscape right).
I have a launch storyboard. If my iPhone 7 Plus is in landscape mode on the home screen when I launch my app, the storyboard appears in landscape mode. How do I tell iOS to always display the storyboard in portrait mode, as if the device were in portrait mode before the app was launched?
Please don't ask why I want this, or tell me it's a bad idea — there's context that would be a distraction to go into in this question.

iPad orientation issue in iOS 5

I have UISplitViewController in StoryBoard that is initial view and I want the app to work only in Landscape mode.
I have restricted orientation to landscape only, and even put in plist Initial interface orientation to Landscape (right home button).
In iOS 6 everything works fine, it shows master and detail view only, but in iOS 5 it is stuck in Portrait mode and only shows Detail view.
Please help me with this, I am stuck with it for last 2 hours...
You need to implement shouldAutorotateToInterfaceOrientation in the view controllers you have contained in the UISplitViewController:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}

tabbar controller in landscape mode

I am working on a project in which I need to have the application in landscape mode. I made the changes in .plist file by setting interface orientation to landscape. I changed the orientation to landscape in the .xib files also but still when the application starts the in the simulator the tabbar controller appears in portrait mode only. Can any one please help with this.
Thanks
Note that by design, the UITabBarController will only rotate to support an interface orientation that all of its view controllers support. It will send the -shouldAutorotateToInterfaceOrientation: message to each of its view controllers and, if they all return YES, will return YES.

iphone os 4 sdk landscape orientation problem

My application has a tab bar controller with a navigation controller in each of its tabs . The application is completely Landscape oriented. But when I try to run in iPhone OS 4, it is not changing to landscape at all. Any suggestions please?

presentModalViewController for UIImagePicker fails in landscape mode for iPhone 3.0

First of all, my code isn't complex - in fact it's just two sample programs from "Beginning iPhone Development: Exploring the iPhone SDK", combined into one program. I took the ViewSwitcher application, which switches between a blue view and a yellow view, and replaced the YellowViewController with the CameraViewController from the camera application.
I have three ViewControllers total. SwitchViewController just switches between BlueViewController and CameraViewController.
Inside CameraViewController, I'm trying to use a UIImagePickerController to choose an image. The picker is presented with presentModalViewController. The catch is that I want to do this in landscape orientation.
Everything works fine under 2.2.1, and everything works fine in 3.0 in portrait mode.
In 3.0 under landscape orientation, however, things break. If I set SwitchViewController to landscape orientation, my screen goes white when I try to present the picker. If I rotate the iPhone a few times, I can see a corner of the picker, which apparently was displayed off screen.
If I set CameraViewController to landscape orientation, the picker doesn't come up at all.
I think this page may have a clue when it says "The most prominent change [in 3.0] I can see is that the modal view controller will always use the application frame instead of the parent view controller's frame." I don't understand exactly what that means, though.
Any help is greatly appreciated. Thanks!
I believe what that means is this: Modal views always use the full screen, even if the parent view controller that invokes them controls a view that is only part of the screen. This makes sense for standard modal views like the camera picker, but I can see why someone who creates a custom modal view might want it to be smaller.
Not sure if that really helps solve your problem though.
Question -- what happens if you bring up the modal view and THEN rotate the phone?
You must have used addSubview in your parent view controller, try using presentModalViewController:.