I have to change the words Search and Cancel from the SearchBar(and the keyboard) when I'm using the search controller.
I have already changed the placeholder like this
searchController.searchBar.placeholder = "My text here..."
But I can't find anything useful for Swift considering the searchBar is constructed programmatically.
searchController.searchResultsUpdater = self
searchController.dimsBackgroundDuringPresentation = false
definesPresentationContext = true
tableView.tableHeaderView = searchController.searchBar
Can anyone help?
UPDATE: so far I managed to change the Cancel button text like this:
searchController.searchBar.setValue("Anuleaza", forKey:"_cancelButtonText")
But could not find a way to change the keyboard word for Search with a custom text.