我如何在默认情况下在横向模式下使用 xcode 3.2.6 创建通用应用程序?我需要为每个视图单独的 .xib 文件,我是否必须使用此代码 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {// 支持返回 YES方向返回(interfaceOrientation == UIInterfaceOrientationLandscape);}
问问题
537 次
2 回答
0
我使用此示例代码并使其基于视图,我只是通过
self.navigationController.navigationBarHidden = YES;
在 RootViewController_Phone.h 和 RootViewController_Pad
BenellingsonPost中使用此代码来隐藏其导航栏
于 2012-03-22T04:38:22.620 回答
0
在您的 plist 中,您应该supported interface orientations
只更改为两项:
项目 0Landscape (right home button)
项目 1Landscape (left home button)
并在每个视图控制器中使用:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (UIInterfaceOrientationIsLandscape(interfaceOrientation));
}
于 2012-03-21T06:28:43.397 回答