I've been banging my head on this for a while, and can't for the life of me figure out how to set the searchBarStyle of a UISearchController's searchBar to .minimal, when it's in a navigation item.
let controller = UISearchController(searchResultsController: nil)
controller.hidesNavigationBarDuringPresentation = true
controller.obscuresBackgroundDuringPresentation = false
controller.searchBar.searchBarStyle = .minimal
controller.searchResultsUpdater = self
controller.searchBar.delegate = self
self.searchController = controller
self.navigationItem.searchController = controller
Am I doing something wrong? Or is this just not supported publicly? As far as I can tell, the default Notes app does something very similar to this, so I'd expect it to be supported, but I simply can't figure it out.