title: iOS 13 strange search controller gap
body: <p>When running the App on iOS 13 beta 6, using Xcode 11 beta 5 I'm encountering the strange gap when presenting search results view controller:  </p>
  
  <p><a href="https://i.stack.imgur.com/WIhfi.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WIhfi.png" alt="enter image description here"></a></p>
  
  <p>Here's a bit of how this is set up:</p>
  
  <pre><code>let searchResultsController = BLSearchResultsController()
  
  let ret = UISearchController(searchResultsController: searchResultsController)
  ret.searchResultsUpdater = self
  ret.delegate = self
  ret.searchBar.delegate = self;
  ret.searchBar.autocapitalizationType = .none
  ret.searchBar.placeholder = NSLocalizedString("SearchMsg", comment: "")
          ret.searchBar.enablesReturnKeyAutomatically = true
  
  if #available(iOS 13.0, *) {
      ret.searchBar.showsScopeBar = false
      ret.searchBar.backgroundColor = .white
  
      let searchTextField = ret.searchBar.searchTextField
      searchTextField.font = UIFont.tuttiRegularFont(16)
      searchTextField.accessibilityIdentifier = "Main Search Field"
      if let searchImageView = searchTextField.leftView as? UIImageView {
          searchImageView.image = UIImage(named: "home-search-icon")
       }
  }
  </code></pre>
  
  <p>The results search controller is a normal <code>UITableViewController</code> and is just added to the <code>navigationItem.searchController</code>. There is no fancy presentation code. When building on latest live Xcode and running on the iOS 11/12 device this issue is not present which lead me to believe some underlying iOS 13 change might be causing this glitch.</p>
  
  <p><strong>When debugging the view hierarchy it looks like the result view controller does not reach to the top of the moved search bar.</strong></p>
  
  <p>I've tried fiddling with the <code>modalPresentationModes</code> trying to exclude the possibility that the changes to the presentation could be the cause, had no luck there.</p>
  
  <p>Has anyone encountered this issue and had luck fixing it?</p>