title: How to prevent status bar from overlapping content with hidesBarsOnSwipe set on UINavigationController?
body: <p>I'm trying to use the new feature added in iOS 8 - hiding the navigation bar while user is scrolling the table view (similar to what mobile Safari does). I'm setting the property <code>hidesBarsOnSwipe</code> of <code>UINavigationController</code> to <code>YES</code> in <code>viewDidAppear</code> method of <code>UITableViewController</code>:</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated {
      [super viewDidAppear:animated];
      if([self.navigationController respondsToSelector:@selector(hidesBarsOnSwipe)]) {
          self.navigationController.hidesBarsOnSwipe = YES;
      }
  }
  </code></pre>
  
  <p>The navigation bar hides when the view is being scrolled. So far so good. But the status bar is still visible and my table view contents show through it, which looks ugly:</p>
  
  <p><img src="https://i.stack.imgur.com/wB1Ct.png" alt="enter image description here"></p>
  
  <p>I tried setting <code>edgesForExtendedLayout</code> to <code>UIEdgeRectNone</code> or adjusting the <code>contentInset</code> of the table view, but it didn't help. Is there any other solution to hide the status bar along with the navigation bar, or make it opaque?</p>