Ios6 ios 6旋转后模式视图大小不正确

Ios6 ios 6旋转后模式视图大小不正确,ios6,modalviewcontroller,Ios6,Modalviewcontroller,我们有一个ipad应用程序,支持landsace左右方向 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Overriden to allow any orientation. return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interface

我们有一个ipad应用程序,支持landsace左右方向

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Overriden to allow any orientation.
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
我们通过调用

childController.modalPresentationStyle = UIModalPresentationPageSheet;
    childController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[parentController presentViewController:childController animated:childController.animated completion:^{
        childController->isBeingShowed = FALSE;
当我们显示一个模式视图时:RootViewController(全屏)->SelectOption(500500)旋转工作正常,selectoptions视图控制器具有其原始大小


当我们显示附加模式视图时:RootViewController(全屏)->SelectOption(500500)->附加选项(300300),旋转后,SelectOption视图控制器大小更改为全屏,而AdditionalOptions视图控制器保持指定的大小。

这个问题用小技巧解决了

问题的根源是,我打开第一个模态视图时是作为页面页打开的,当我从第一个模态视图打开第二个模态视图时,我得到了MainView(全屏),模态视图是作为页面页打开的,第二个页面页是从上一个页面页打开的。这种架构导致了旋转问题

技巧:现在我打开第二个模式视图作为表单,重新计算坐标以对应页面坐标系。现在看起来像是MainView->PageSheet->FormSheet,问题已经解决了


很抱歉,没有代码。

您可以在上找到答案,我在这里问了和回答了相同的问题:希望有帮助。感谢链接,但这不是同一个问题。模态视图的方向会发生变化,但若模态视图的父视图具有相同的显示样式,它将变为全屏显示