I want to change text alignment of Placeholder in Searchcontroller searchBar.
I used this Swift code to create search bar in my navigation controller:
@IBAction func searchwithAddress(_ sender: Any) {
let searchController = UISearchController(searchResultsController: searchResultController)
searchController.searchBar.delegate = self
searchController.obscuresBackgroundDuringPresentation = false
searchController.searchBar.becomeFirstResponder()
definesPresentationContext = true
self.present(searchController, animated: true, completion: nil)
}
How can I use textalign for my searchbar?