I am trying to use standard UIRefreshControland UISearchControlleron UITableViewController. However, this is not like what he should do. When updating, scrolling leaves the navigation panel with a large empty area, presumably where the counter should be used:

I have an example project on GitHub . Here's how the controls are configured:
override func viewDidLoad() {
super.viewDidLoad()
let spinner = UIRefreshControl()
spinner.addTarget(self, action: #selector(refresh), for: .valueChanged)
refreshControl = spinner
searchController = UISearchController(searchResultsController: nil)
navigationItem.searchController = searchController
}
I tried to assign an update control to a property UITableViewinstead of an object UITableViewController, which doesn't matter.
Does anyone face the same problem?