uinavigationcontroller and landscape mode
Does uinavigationcontroller support landscap开发者_Go百科e view? Meaning that I want the bar to appear at the top of the iphone and for the view to be fat.. like 480px
Yes it does. But you need to support that orientation.
Thanks,
In your UIViewController
that you want to support multiple orientation mode.
Implements the following function to indicates that you want to support (both) landscape mode and only the normal portrait mode. (The most common setup)
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
switch (interfaceOrientation) {
case UIInterfaceOrientationLandscapeLeft:
case UIInterfaceOrientationLandscapeRight:
case UIInterfaceOrientationPortrait: {
return YES;
} break;
case UIInterfaceOrientationPortraitUpsideDown:
default: {
return NO;
} break;
}
}
The UINavigationController
will follows the current UIViewController
orientation setup and react accordingly.
精彩评论