通用xcode 3.2.6默认情况下为横向模式



默认情况下,如何在横向模式下使用xcode 3.2.6创建通用应用程序?我需要每个视图的seprate.xib文件,是否必须使用此代码-(BOOL)应自动旋转接口方向:(UIInterfaceOrientation)接口方向{//对于支持的方向,返回YESreturn(interfaceOrientation==UIInterfaceOrientationalLandscape);}

在您的plist中,您应该将supported interface orientations更改为两项:

项目0 Landscape (right home button)

第1项Landscape (left home button)

并在每个视图控制器中使用:

  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
   // Return YES for supported orientations
   return (UIInterfaceOrientationIsLandscape(interfaceOrientation));
}

我使用此示例代码,为了使其基于视图,我只使用此代码隐藏其导航栏self.navigationController.navigationBarHidden = YES;在RootViewController_Phone.h和RootViewControler_Pad中捐赠后

最新更新