2

有一个UINavigationControllerrootViewController(作为根)和secondViewController(作为一个孩子)。rootViewController应该能够旋转到任何方向(按预期工作,我只是覆盖shouldAutorotateToInterfaceOrientation),但secondViewController应该只在纵向模式下工作(在这里,我将shouldAutorotateToInterfaceOrientation设置

interfaceOrientation == UIInterfaceOrientationPortrait

问题:在从rootViewController 导航到 secondViewController在 Landscape之后,secondViewController不会将其 UI 切换回纵向。有正确的方法吗?

4

1 回答 1

1

尝试放一个

[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];  

在你的声明之后。看看这是否有效。

于 2011-07-29T17:31:56.123 回答