我想在Searchcontroller searchBar 中更改占位符的文字对齐。
我使用此Swift代码在导航控制器中创建搜索栏:
@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)
}
如何在搜索栏中使用textalign?