I'm using an integrated UISearchBar with UINavigationItem:
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = false
However, when I add prompt to the UISearchBar, the layout breaks and the UI looks like this:
searchController.searchBar.prompt = "Adding text to the SearchBar"
What is the cause of this issue and how to resolve it?


UILabelto yourUISearchBar