Add filter button to UISearchController
<p>I want to add a "filter" or "sort" button next to the <code>searchBar</code> inside a <code>UISearchController</code>. I have already tried to add the <code>UIButton</code> and the <code>searchbar</code> into a <code>UIView</code> and set this as my <code>UITableView tableView.tableHeaderView</code> This does not work because the <code>tableView.tableHeaderView</code> get's set back to the <code>UISearchBar</code> only when dismissing the controller. Here is an example of how I want it to look:<a href="https://i.stack.imgur.com/Ro2yu.png"><img src="https://i.stack.imgur.com/Ro2yu.png" alt="enter image description here"></a></p>