so I previously had my search controller embedded inside the Navigation bar so that the gradient of the navigation bar also covered the search bar.
Suddenly, I believe from an XCode update, I found that now the navigation bar's background color stops firmly at the top of the search controller.I am having trouble pin-pointing why this happens.
This is my current code, which previously worked. Any thoughts?
private func setNavigationBarAesthetics() {
if let navigationBar = self.navigationController?.navigationBar {
navigationBar.setBackgroundImage(UIImage(named: "testbg"), for: .default)
}
self.searchController.searchBar.delegate = self
self.searchController.delegate = self
searchController.searchResultsUpdater = self
searchController.definesPresentationContext = false
searchController.obscuresBackgroundDuringPresentation = false
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = true
searchController.hidesNavigationBarDuringPresentation = false
}