在我的 splitview 应用程序中,当应用程序设置中没有存储共享 key 时,我会显示一个登录对话框。这要求应用程序在出现此对话框时停止旋转。我通过将详细 View Controller 的 shouldAutorotate 方法重写为如下内容来实现此目的:
-(BOOL) shouldAutorotate
{
return ![SynchronizationHandler displaysLoginWindow];
}
但是,随着最近发布的 iOS 6.0.1,此方法永远不会被调用。我已经进行了一些搜索,但没有找到有关此特定案例的任何信息。
最佳答案
使用 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 持续时间:(NSTimeInterval)duration {}
代替
关于objective-c - 如何控制分割 View 中的界面方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13684909/