【问题标题】:presentModalView coming in from the side in my landscape apppresentModalView 从我的横向应用程序的侧面进来
【发布时间】:2011-04-07 21:40:13
【问题描述】:

我有一个 UIViewController 想用[self presentModalViewController:settingsController animated:YES] 显示。

我的应用程序处于横向模式。当我使用presentModalViewController 时,视图会从侧面滑入,就好像它处于纵向模式一样。当我使用addSubview: 添加视图时,它会正确显示在屏幕上。

我确实在我的视图控制器中使用了shouldAutorotateToInterfaceOrientation,但它似乎对解决这个问题没有帮助。

- (BOOL)shouldAutorotateToInterfaceOrientation (UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

有没有人遇到过这个或者知道我哪里出错了?

【问题讨论】:

    标签: iphone ios view orientation landscape


    【解决方案1】:

    尝试从您的主视图控制器而不是从子视图之一的控制器呈现模态视图。这对我有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多