【问题标题】:Navigation Bar under the Status bar状态栏下的导航栏
【发布时间】:2017-04-11 09:28:47
【问题描述】:

我需要在状态栏下制作我的导航栏。您可以在下面的图片中看到我的问题

this picture

我希望状态栏有白色背景。

(请迅速)

【问题讨论】:

  • 这个没问题,用google
  • @Lu_unfortunately,我没有找到任何适合我的东西
  • @Lu_如果这对你来说不是问题,请帮助我,给我一个链接。我找到了很多主题,但它们不适合我。
  • 导航栏位于状态栏下方,您是否尝试将状态栏和导航栏都设为白色?

标签: swift swift3 uinavigationbar statusbar


【解决方案1】:

在 ios 10 和 swift 3 中,

  1. 在 info.plist 中改变行

    View controller-based status bar appearance and set it to NO
    
  2. 在 AppDelegate.swift 中,在 func didFinishLaunchingWithOptions 中,

      UIApplication.shared.statusBarStyle = .lightContent
    

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-18
    • 1970-01-01
    • 1970-01-01
    • 2013-09-14
    相关资源
    最近更新 更多