title: How to change UIViewControllerBasedStatusBarAppearance to YES/NO programmatically in iOS 7?
body: <p>My application has a dark background, but in iOS 7 the status bar became transparent. So I can't see anything there, only green battery indicator in the corner. How can I change the status bar text color to Green or Orange like it is on the home screen?</p>
  
  <p>I know about </p>
  
  <ol>
  <li><p>Set the <code>UIViewControllerBasedStatusBarAppearance</code> to <code>YES</code> in the plist</p></li>
  <li><p>In <code>viewDidLoad</code> do a <code>[self setNeedsStatusBarAppearanceUpdate];</code></p></li>
  <li><p>Add the following method:</p>
  
  <pre><code>-(UIStatusBarStyle)preferredStatusBarStyle{ 
      return UIStatusBarStyleLightContent; 
  }
  </code></pre></li>
  </ol>
  
  <p>How can I change <code>UIViewControllerBasedStatusBarAppearance</code> programmatically?</p>
  
  <p>Thanks in advance...</p>