title: Set the status bar to black colour
body: <p>I want to set the colour of the <code>status bar</code> (The small strip on top where the clock and battery is displayed) to black background  with white text. How can I do this ?</p>
  
  <p><a href="https://i.stack.imgur.com/qe9Uf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qe9Uf.png" alt="enter image description here"></a></p>
  
  <p>My approach so far :</p>
  
  <p>I added the following in the <code>info.plist</code></p>
  
  <pre><code>View controller-based status bar appearance --&gt; NO
  </code></pre>
  
  <p>and in the <code>viewController</code></p>
  
  <pre><code>- (UIStatusBarStyle)preferredStatusBarStyle
  {
      return UIStatusBarStyleDefault;
  }
  </code></pre>
  
  <p>However, the style does not change.  How can I make the status bar black?</p>