![](/img/trans.png)
[英]"viewWillTransitionToSize:" not called in iOS 9 when the view controller is presented modally
[英]willRotateToInterfaceOrientation not being called in a modally presented view controller
我的整个应用都是肖像。 当您在集合视图控制器中点击图像时,我会以模态方式在MWPhotoBrowser视图控制器中显示图像。 所以我想在那里支持多种方向。 我只支持iOS 6,并且有以下定位方法:
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
这些被调用,但willRotateToInterfaceOrientation
和后续的willAnimateRotationToInterfaceOrientation
和didRotateFromInterfaceOrientation
永远不会被调用。
它不会出现在导航控制器或任何东西中。 不知道我还需要做什么才能在模态显示的视图控制器中支持旋转。
重新阅读文档后,我相信我的应用程序必须支持应用程序(plist)级别的横向方向。 在这种情况下,我将不得不在我的其他视图控制器中更改支持的方向以限制它我猜。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.