Skip to content

Instantly share code, notes, and snippets.

@alexleutgoeb
Created March 19, 2011 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alexleutgoeb/877866 to your computer and use it in GitHub Desktop.
Save alexleutgoeb/877866 to your computer and use it in GitHub Desktop.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if (self.tabBarController.selectedViewController == self.navigationController)
return NO;
else
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
@myell0w
Copy link

myell0w commented Mar 19, 2011

Danke für das Code-Segment, so weit hab ichs derzeit auch. Ich war bei meinem Tweet leider nicht exakt genug, eigentlich will ich nicht die Rotation in diesem Tab verhindern, sondern ich will dass dieser Tab immer im Portrait-Modus erscheint. Das Problem mit dieser Lösung ist also wenn die App im Landscape ist, und der User auf den Tab wechselt. Dann sollte sich die App in den Portrait-Modus drehen….

@alexleutgoeb
Copy link
Author

Hab das auch mal probiert, jedoch musste ich dann view + status bar manuell drehen, und das war richtig böse. Das ist dann der Fall den Peter meinte: don't fight the framework. ;)

Evtl kannst du "einfach" das Interface nochmal überdenken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment