【问题标题】:iPhone supported orientations in XcodeiPhone 在 Xcode 中支持的方向
【发布时间】:2011-10-17 07:20:48
【问题描述】:

我在 plist 中设置它应该只支持纵向模式,但是当我旋转它时,视图会发生变化。它以前对我有用,但现在不行......

请帮忙,我快疯了!

【问题讨论】:

  • plist 说了什么,你试过什么?需要更多信息。
  • 支持的界面方向:项目 0 纵向(底部主页按钮)

标签: iphone xcode orientation


【解决方案1】:

韦德兰·布罗耶维奇,

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait) 

}

以上代码只支持竖屏模式..

【讨论】:

    【解决方案2】:

    你可以在里面写代码。

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationPortrait) 
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-09
      • 2020-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多