我创建了一个UISearchController
的导航栏。
以下是我的代码:
@IBAction func showSearchController(sender: AnyObject) {
let searchController = UISearchController(searchResultsController: searchResultController)
searchController.searchBar.delegate = self
/*
searchController.searchBar.placeholder = "hhhhhhhhhhh"
searchController.navigationItem.title = "hhhhhhhhhhh"
searchController.navigationController?.navigationBar.topItem?.title = "hhhhhhhh" -->i try these codes for to change*/
self.presentViewController(searchController, animated: true, completion: nil)
}
但我无法改变文字。