【问题标题】:Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES' in xamarin iOS支持的方向与应用程序没有共同的方向,并且 shouldAutorotate 在 xamarin iOS 中返回 YES'
【发布时间】:2015-03-25 08:03:46
【问题描述】:

我的应用仅支持横向模式。当我尝试在应用程序中打开图像选择器时,它显示如下异常: “支持的方向与应用程序没有共同的方向,并且 shouldAutorotate 正在返回 YES” 我曾尝试为 shouldAutorotate 设置错误值,但没有成功。我被这个困住了。有人对此有任何帮助吗?

【问题讨论】:

    标签: ios xamarin


    【解决方案1】:

    如果你喜欢使用 UIImagePickerController 作为横向模式,而不是

    - (BOOL)shouldAutorotate
    {
     return NO;
    }
    

    使用这个

    - (NSUInteger)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskLandscape;
    }
    

    但请务必将其检查为:

    【讨论】:

      猜你喜欢
      • 2012-09-14
      • 2014-11-19
      • 1970-01-01
      • 1970-01-01
      • 2013-01-05
      • 2015-11-17
      • 1970-01-01
      • 2013-02-09
      • 1970-01-01
      相关资源
      最近更新 更多