开发者

Set orientation to Portrait in one view when the navigation controller is portrait

If my application is in开发者_C百科 the Landscape position and then they press a button to load the info view, how can I set the info view to only support the portrait position, and therefore change the orientation to portrait when the view is loaded?


Maybe something like this:

[application setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (UIInterfaceOrientationPortrait == interfaceOrientation )
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜