【问题标题】:UIInterfaceOrientation not rotating to correct orientationUIInterfaceOrientation 没有旋转到正确的方向
【发布时间】:2017-04-20 11:07:36
【问题描述】:

我在像这样的另一个 ViewController 上呈现不同的 UIViewController

    [_presentingViewController presentViewController:_backgroundViewController animated:NO completion:^{
       //present another view controller
    }]; 

有时呈现的 ViewController 和呈现的 ViewController 之间的方向会发生变化,这在 ViewController 中进行管理,如下所示:

- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskLandscape;
}

通常效果很好,但每隔一段时间就会如下图所示。然后当我旋转我手中的设备时,它会翻转到正确的布局。但起初它被错误地渲染。 我总是在完成处理程序中处理表示和解散的链接。

奇怪的是我无法重现它。它只是在设备和模拟器上都很少发生。

【问题讨论】:

    标签: ios objective-c iphone uikit


    【解决方案1】:

    显然,“需要全屏”存在一些问题。自从我激活它之后,它就再也没有出现过。

    【讨论】:

      猜你喜欢
      • 2023-04-04
      • 2021-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多