I am adding a searchBar to the header of my UITableView and want to be able to use it while user is scrolling through the the cells.
I have tried everything such as setting the style to UITableViewStyleGrouped but it didn't solve my problem.
here is the code
var searchController: UISearchController = UISearchController(searchResultsController: nil)
searchController.searchResultsUpdater = self
searchController.dimsBackgroundDuringPresentation = false
definesPresentationContext = true
tableView.tableHeaderView = searchController.searchBar
any reason why is the header stays at the stop?