UISearchController created and used like this in viewDidLoad
search = UISearchController(searchResultsController: nil)
search.searchResultsUpdater = self
search.obscuresBackgroundDuringPresentation = false
search.definesPresentationContext = true
search.searchBar.placeholder = "Search books"
navigationItem.searchController = search
I need to change horizontal position (offset, inset?) of the searchBar (search text field?) to align with title and content.
I already tried to change the frame of searchBar in viewDidAppear (left pic below), but it goes back when text field becomes first responder (right pic).
Is there any working solution?