首页 文章

通用xcode 3.2.6默认为横向模式

提问于
浏览
0

如何使用xcode 3.2.6在横向模式下通过默认创建通用应用程序?我需要为每个视图分别使用.xib文件,我是否必须使用此代码 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {//返回YES表示支持orientation返回(interfaceOrientation == UIInterfaceOrientationLandscape); }

2 回答

  • 0

    在你的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));
    }
    
  • 0

    我使用这个示例代码并使其基于View我只是通过在RootViewController_Phone.h和RootViewController_Pad BenellingsonPost中使用此代码 self.navigationController.navigationBarHidden = YES; 来隐藏其导航栏

相关问题