【问题标题】:Hide status bar in Launch Screen在启动屏幕中隐藏状态栏
【发布时间】:2018-02-10 08:18:53
【问题描述】:

默认情况下,启动屏幕提供状态栏。是否可以像 Twitter 应用程序 (iOS) 一样在启动屏幕中隐藏状态栏。

【问题讨论】:

  • 在您的 Info.plist 中添加:Status bar is initially hidden YES
  • @Rocky 感谢您的帮助!它只是工作。
  • @Rocky 这应该是答案而不是评论。
  • 作为答案添加了更多细节:)

标签: swift swift3 uistatusbar launch-screen


【解决方案1】:

要最初在启动屏幕上隐藏状态栏,请在 ✓ 上设置 Hide status bar 复选标记

在您的 Info.plist 中添加:Status bar is initially hiddenYES

以上两个选项具有相同的影响。

另外

隐藏特定 ViewController 上的状态栏 override prefersStatusBarHiddentrue

override var prefersStatusBarHidden: Bool{
    return true
}

【讨论】:

  • 第一个选项没用。 :) 第二个是完美的。谢谢!
  • 第一个也很好用,不过需要在AppTarget -> General -> DeploymentInfo(不在storyboard里)找
猜你喜欢
  • 1970-01-01
  • 2020-01-10
  • 1970-01-01
  • 2020-05-10
  • 1970-01-01
  • 2016-03-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多