title: UISearchController searchbar in a tableview header leaves status bar sized gap
body: <p>Im using a UIViewController with a tableView.  I've setup a searchcontroller and embed the searchbar into the tableview header. When i search it leaves a status bar sized gap between the tableview and the uiview above it. I realize there are a lot of other questions on SO about this but none of them solved this problem.</p>
  
  <p>Here is the code for setting up the searchbar:</p>
  
  <pre><code>self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
  self.searchController.searchResultsUpdater = self;
  self.searchController.dimsBackgroundDuringPresentation = NO;
  self.searchController.hidesNavigationBarDuringPresentation = YES;
  self.searchController.searchBar.delegate = self;
  self.searchController.searchBar.backgroundImage = [UIImage new];
  self.searchController.searchBar.backgroundColor = kBlueNavBarColor;
  self.searchController.searchBar.tintColor = [UIColor whiteColor];
  
  self.tableView.tableHeaderView = self.searchController.searchBar;
  self.definesPresentationContext = YES;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/70qf9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/70qf9.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/Jal8u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jal8u.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/QJXKe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QJXKe.png" alt="Here is the layout of the view:"></a></p>