【问题标题】:IPad application first comes in portrait mode and then in landscape mode after unlocking the screen which was in landscape mode at the time of lockingiPad应用程序首先进入纵向模式,然后在解锁屏幕后进入横向模式,在锁定时处于横向模式
【发布时间】:2011-12-29 11:26:48
【问题描述】:

可能与 :- iPad Application Comes Up in Portrait Orientation After Screen Unlock Regardless of Orientation on Screen Sleep 重复,但它不提供任何解决方案。

我的问题是我在 iPad 上以横向模式工作并且我锁定了我的屏幕。之后,当我解锁时,我的屏幕首先切换到纵向模式,然后切换到横向模式。 我不知道为什么它首先切换到纵向模式。

如果有人以前遇到过这个问题或知道如何解决这个问题,请帮助我。

提前致谢。

任何建议都将受到高度赞赏。

【问题讨论】:

  • 在您的Info.plist 文件中,UISupportedInterfaceOrientations~ipad(或UISupportedInterfaceOrientations,如果不存在)下会显示什么?
  • 我的 info.plist 中不存在这个参数。我应该添加这个吗?
  • 我的应用程序支持纵向和横向模式。
  • 是的。如果您使用的是 Xcode 4,您可以通过转到应用程序的目标并选择摘要选项卡来执行此操作。如果您向下滚动,您应该会看到标题为“支持的设备方向”的部分,只需选择您想要支持的方向,它就会出现在您的 Info.plist 中。
  • 感谢 Sherman Lo 我解决了我的问题,我在 info.plist 中添加了这个参数并向这个参数添加了值。如果你写下你的评论作为答案,我希望我能投票并接受。谢谢。 ..

标签: ios ipad screen-orientation orientation-changes screen-lock


【解决方案1】:

在您的Info.plist 文件中,确保UISupportedInterfaceOrientations~ipad(或UISupportedInterfaceOrientations)存在并且列出了您的应用支持的纵向和横向。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-29
    • 2012-03-05
    • 2014-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多