开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜