title: Status bar and navigation bar does not seems to have the same color iOS Swift
body: <p>I want to set the status bar color the same color as the navigation bar. when I try to set the navigation and status bar to the same color the navigation bar always appear in a lighter color than the status bar. </p>
  
  <p>This is what I want: </p>
  
  <p><a href="https://i.stack.imgur.com/W3J86.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W3J86.png" alt="enter image description here"></a>  </p>
  
  <p>My result:</p>
  
  <p><a href="https://i.stack.imgur.com/pfmtp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pfmtp.png" alt="enter image description here"></a></p>
  
  <p>Code in AppDelegate:</p>
  
  <p>Status bar: </p>
  
  <pre><code>UIApplication.sharedApplication().statusBarStyle = .Default
      let statusBar: UIView = UIApplication.sharedApplication().valueForKey("statusBar") as! UIView
      if statusBar.respondsToSelector(Selector("setBackgroundColor:")) 
  {
        statusBar.backgroundColor = UIColor(red: 43/255.0, green: 79/255.0, blue: 133/255.0, alpha: 1.0)
        statusBar.tintColor = UIColor(red: 43/255.0, green: 79/255.0, blue: 133/255.0, alpha: 1.0)
  }
  </code></pre>
  
  <p>Navigation bar:</p>
  
  <pre><code>UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
          UINavigationBar.appearance().backgroundColor = UIColor(red: 43/255.0, green: 79/255.0, blue: 133/255.0, alpha: 1.0)
          UINavigationBar.appearance().tintColor = UIColor.whiteColor()
          UIApplication.sharedApplication().statusBarHidden = false
          UIApplication.sharedApplication().statusBarStyle = .Default
  </code></pre>
  
  <p>Could anyone give me any suggestion on how to solve this problem. </p>
  
  <p>Thanks in advance!</p>