title: iOS 11 UISearchController disappearing when typing
body: <p>iOS 11 search bar keeps disappearing when typing i have tried to set the <code>searchController.hidesNavigationBarDuringPresentation = false</code> also the <code>searchController.definesPresentationContext = true</code> here is a video of what is going on</p>
  
  <h2><a href="https://drive.google.com/open?id=1Wbmj8TtMkgrgVK1-_BhHhg-fHIUT5Grt" rel="nofollow noreferrer">Video</a></h2>
  
  <p>My delegate function</p>
  
  <pre><code>func updateSearchResults(for searchController: UISearchController) {
      filarr = arr.filter({ (arr:String) -&gt; Bool in
          if arr.contains(searchController.searchBar.text!){
              return true
          }else{
              return false
          }
  
      })
      resultController.tableView.reloadData()
  }
  
  //Assigning the searchbarcontroller
  if #available(iOS 11.0, *) {
          self.navigationController?.navigationBar.prefersLargeTitles = true
          self.navigationItem.searchController = searchController
          self.navigationItem.hidesSearchBarWhenScrolling = false
      } else {
          tableView.tableHeaderView = searchController.searchBar
      }
  </code></pre>