Reputation: 51
I am working on iPad application. My problem is I am not getting proper orientation in my first view controller. I have checked shouldAutorotate
function as well. App gets proper orientation if i move device horizontally or vertically. But I can see springboard is in landscape mode and even Application Splash screen is Landscape but still my first view controller appears in portrait. I am not able to find solution for this. Is any one having idea about this??
I am not able to find the cause of this issue.
And one more issue is I have created my application 1 year ago with xcode 3.2 and now I am using xcode 4.2 now I am facing some interesting message on my console when app starts "Applications are expected to have a root view controller at the end of application launch". My app is having navigation controller and I am adding it no window.
Any one is having idea about self.window.rootViewController
property?? How can I solve this warning?
Thank you in advance
Upvotes: 0
Views: 428
Reputation: 34912
For the orientation problem, see this question:
For the Xcode 3 vs Xcode 4 issue with root view controller, that will be that you're not setting the rootViewController
property of your UIWindow
. You need to either hook it up in IB or set it in your applicationDidFinishLaunching
, probably like this:
self.window.rootViewController = self.navController; ///< Assuming your navigation controller is called `navController'
Upvotes: 1