【问题标题】:willRotateToInterfaceOrientation not being called in a modally presented view controllerwillRotateToInterfaceOrientation 未在模态呈现的视图控制器中调用
【发布时间】:2013-04-25 01:04:57
【问题描述】:

我的整个应用都是纵向的。当您在集合视图控制器中点击图像时,我会以模态方式在 MWPhotoBrowser 视图控制器中呈现图像。所以我想在那里支持多个方向。我只支持iOS 6,并且有以下定位方式:

- (BOOL)shouldAutorotate {
    return YES;
}


- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskAllButUpsideDown;
}

这些被调用,但willRotateToInterfaceOrientation 和后续的willAnimateRotationToInterfaceOrientationdidRotateFromInterfaceOrientation 永远不会被调用。

它不会出现在导航控制器或任何东西中。不知道我还需要在这里做什么才能仅在模态呈现的视图控制器中支持旋转。

【问题讨论】:

    标签: ios objective-c ios6 uiinterfaceorientation screen-rotation


    【解决方案1】:

    重新阅读文档后,我相信我的应用程序必须在应用程序 (plist) 级别支持横向。在这种情况下,我将不得不更改其他视图控制器中支持的方向以限制它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-03
      • 2011-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多