美文网首页
Swift状态栏显示隐藏

Swift状态栏显示隐藏

作者: Boxzhi | 来源:发表于2018-09-17 15:28 被阅读11次

    最近有个需求,在启动页或欢迎页的时候,状态栏进行隐藏,其他时候状态栏显示...

    实现步骤如下

    • 添加Status bar is initially hiddenYES

      WX20180917-151851@2x.png
    • 在AppDelegate文件中的func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool设置隐藏

      WX20180917-152333@2x.png
      WX20180917-152506@2x.png
    • 在自定义TabbarController文件的override func viewDidLoad()中设置显示
      * YTStatusBarHidden = false

    相关文章

      网友评论

          本文标题:Swift状态栏显示隐藏

          本文链接:https://www.haomeiwen.com/subject/wgtcgftx.html