I have code that creates a UISearchController\' in my UIVIew\'s
viewDidLoad`.
self.resultSearchController = ({
let controller = UISearch
Solved! It was a simple fix. I changed this code
class ViewController: UITableViewController, UISearchResultsUpdating, UISearchBarDelegate {
var resultSearchController = UISearchController()
to this:
class ViewController: UITableViewController, UISearchResultsUpdating, UISearchBarDelegate {
var resultSearchController: UISearchController!
This fixes the problem.