iOS Custom Status Bar Background Color not displaying

后端 未结 9 1814
别那么骄傲
别那么骄傲 2020-12-16 13:30

I am trying to fill the status bar background color to orange using the following

UINavigationBar.appearance().tintColor = UIColor.orangeColor()
UINavigation         


        
9条回答
  •  有刺的猬
    2020-12-16 13:53

    Add this code in didFinishLaunchingWithOptions in AppDelegate

    let view = UIView(frame: CGRect(x: 0.0, y: 0.0, width: UIScreen.mainScreen().bounds.size.width, height: 20.0))
    view.backgroundColor=UIColor.orangeColor()
    self.window.rootViewController.view.addSubview(view)
    

    Hope it helps you....!!!

提交回复
热议问题