问题描述
我有一个情况,根控制器呈现模态 A,其中 modalPresentationStyle
设置为 UIModalPresentationOverFullScreen
。 A 依次呈现模态 B,其中 modalPresentationStyle
设置为 UIModalPresentationPageSheet
。
在模态 A 中,我有:
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
在 B 中我有:
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
return self.presentingViewController.supportedInterfaceOrientations;
}
您希望 B 不会旋转到横向,因为 A 不支持它,但是,情况并非如此,B 可以自由旋转。这里发生了什么事?如何让 B 始终遵循 A 的 supportedInterfaceOrientations?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)