I had been using the following code prior to iOS 11 to customize the appearance of the UISearchController search bar: var searchController = UISearchController(searchResultsController: nil) searchController.searchBar.setDefaultSearchBar() searchController.searchResultsUpdater = self if #available(iOS 11.0, *) { navigationItem.searchController = searchController } else { tableView.tableHeaderView =