title: UISearchController not searching in UITableViewController
body: <p>I have set up a UISearchController as a header for my tableview with the following code:</p>
  
  <pre><code>let mySearchController = UISearchController(searchResultsController: nil)
  
  func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
  
      let keywords = searchBar.text
      let finalKeywords = keywords?.replacingOccurrences(of: " ", with: "+")
  
      searchUrl = "https://api.spotify.com/v1/search?q=\(finalKeywords!)&amp;type=track&amp;limit=20"
      print(searchUrl)
  
      callAlamo(url: searchUrl)
  
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      tableView.register(postCell.self, forCellReuseIdentifier: cellId)
      tableView.separatorColor = .red
  
      mySearchController.dimsBackgroundDuringPresentation = false
      definesPresentationContext = true
      mySearchController.delegate = self as? UISearchControllerDelegate
      tableView.tableHeaderView = mySearchController.searchBar
  
  }
  </code></pre>
  
  <p>I adde a breakpoint at the searchBarButtonClicked function and at the print(searchUrl) inside of the function, but it never went to the breakpoints. Why is the searchBarSearchButtonClicked function not executing when I click on the search bar?</p>