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 )
}
精彩评论