iPad Navigation Controller landscape issue
I am changing my application to universal and want all the views of the iPad to be in landscape mode. My First view is a UIViewController which was added to the window using:
[window addSubview:mainController.view];
Using this view, you can select a button and a navigation controller appears. The navigation controller is added as follows:
[[[UIApplication sharedApplication] keyWindow] addSubview:navigationController.view];
The main view is viewed in landscape mode correctly. However, when I add the navigation controller it is added in portrait mode (IPad is still in landscape, but the navigation controller is flipped). I changed the shouldAutorotat开发者_Go百科e methods to support landscapeLeft while using iPad, changed the iPad IB tableView to be in landscape mode, changed the plist file to be in landscape as well. Did I miss something that causes it to be added in portrait?
Thanks in Advance,
Sami
I see this is old and you say you fixed it, yet it is still marked as unanswered by StackOverflow.
I will add to the discussion that a view controller should only be doing things to its own view. Anything you need to add, push, remove etc should be done from there. The view controller should not be doing things to the window. Good abstractions should focus on what is under them.
精彩评论