1

I've got an iPad App with a TabBarController. Since iOS5 I'm note able anymore to get the correct orientation in the viedDidLoad or viewWillAppear when I start the app on the iPad in landscape. It always returns Portrait. When I ask for the orientation in viewDidAppear, everything is fine and correct. In iOS4 I was able to get the right orientation, but now I build for iOS5 ... not anymore.

Please. What can I do to get the right orientation on the iPad on startup?

This is how I get my orientation:

    UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;

Thanks!

wolfrevo
  • 2,006
  • 2
  • 25
  • 32

1 Answers1

0

If you are loading any viewcontroller before loading RootViewContoller then Orientation of RootViewController needs to be set before adding it to window. you may find answer HERE

Community
  • 1
  • 1
Ram Vadranam
  • 485
  • 5
  • 14