I’m attaching a UISearchController to the navigationItem.searchController property of a UITableViewController on iOS 11. This works fine: I can use the nice iOS
navigationItem.searchController
On iOS 13, @Jordan Wood's answer didn't work. Instead I did:
override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) UIView.performWithoutAnimation { searchController.isActive = true searchController.isActive = false } }