【问题标题】:in ipad ios 5.0 version can't display app in landscape mode在 ipad ios 5.0 版本中无法以横向模式显示应用程序
【发布时间】:2014-01-15 05:40:23
【问题描述】:

我在 iphone 和 ipad 中制作应用程序,iphone 应用程序在纵向(底部主页按钮),我在横向(右主页按钮)中制作 ipad 应用程序,在 ipad ios 6,7 版本显示应用程序横向模式但 ios 5 不能横向显示

info.plist 的屏幕截图

ios 7 截图

ios 5 截图

请帮帮我

【问题讨论】:

    标签: ios orientation xcode5 uiinterfaceorientation


    【解决方案1】:

    试试这个? - orientation is not working in ios 5 and it is working in ios 6

    iOS 5 和 6+ 之间如何处理方向变化。

    【讨论】:

      【解决方案2】:

      最后我在所有 ipad viewcontroller 中放弃了 write belove 方法

          -(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
              return UIInterfaceOrientationLandscapeRight;
          }
          -(BOOL) shouldAutorotate {
      
              if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
                  return YES;
              }
              return NO;
          }
          -(NSUInteger)supportedInterfaceOrientations{
              return UIInterfaceOrientationMaskAll;
          }
          -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
      
              if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
                  if (interfaceOrientation==UIInterfaceOrientationLandscapeRight) {
      
                      return YES;
                  }
              }
              return NO;
      
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-03-06
        • 2014-10-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多