Question

and heres the deal.

Im trying to get a few of my views to play nicely together, but unfortunately i must be missing something.

heres the over view i have

  • Application Delegate
  • UIViewController containing a tabbarcontroller
  • UiViewController containing an OpenGL view (needs to be landscape)

The application Delgate handles the two views via the
- (void) didRotate:(NSNotification *)notification
function.

I seem to be running into an issue when i try to toggle away from the view with the tabbarcontroller to the other view, it always load the other view in potrait mode.

now i know the landscape view works, as ive loaded it right off the bat and it works fine. It seems to be the tabbarcontroller. After it (the view with the tabbarcontroller) is init and added, thats when i begin to see this weirdness.

Ive googled and stackoverflowed to see if any solution helps, but i cant seem to find anything. Any help would be greatly appreciated.

Was it helpful?

Solution

Tab bar controllers only accept orientation changes that are in sync across the view controllers they contain.

In your case, portrait in one view controller means portrait across the board. You need to make sure that shouldAutorotateToInterfaceOrientation: returns YES in the same manner across all your view controllers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top