【问题标题】:Cannot rotate to both portrait orientations无法旋转到两个纵向
【发布时间】:2011-04-19 06:38:50
【问题描述】:

我已经将纵向方向添加到 iPad 和普通的 .plist 中,但是它仍然没有旋转到顶部纵向上的按钮:S 这是我在 firstviewcontroller.m 中的代码

    // Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}

【问题讨论】:

    标签: iphone objective-c screen-rotation


    【解决方案1】:

    把它放在你所有的视图控制器中,可能你有一个基本的和覆盖的每个 iPhone/iPad。他们每个人都必须返回 YES(或 YES/NO,具体取决于您要支持的方向)。

    【讨论】:

      猜你喜欢
      • 2023-04-06
      • 2023-03-05
      • 1970-01-01
      • 2012-12-13
      • 1970-01-01
      • 1970-01-01
      • 2015-10-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多