Frage

I have a UI table view with a search bar and it works well in normal case. Now the app may enter this screen with the search key word from the previous screen. When the screen is displayed, the keyword need be inputted in the search bar programmably and the table view need display the filtered the records as usual. Can anyone advise me how to implement this feature?

War es hilfreich?

Lösung

If you are using a UISearchDisplayController, you can grab its searchBar property (an instance of UISearchBar) and call setText: on the searchBar to set the text.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top