Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UISearchBar - what is "search results button" for?

(Duplicate of this question, but I figured I could try again, since that one wasn't answered...)

The UISearchBar on the iPhone has an option showsSearchResultsButton. When you turn it on, it shows a button with horizontal lines inside the search bar, and you can implement a callback that will be called when the user presses it.

The thing is, I can't find a single place on the Internet where it says what the intended purpose of this button is. I know I could make it do anything, but I'd like to know what it's actually for. Should it show a history of searches, or all items without filtering, or what?

like image 746
Kuba Suder Avatar asked Sep 09 '11 12:09

Kuba Suder


1 Answers

It's simply to show search results when tapped.

Where Apple uses this is in their iPad App Store application. If you go to the Categories tab you'll see various app categories. Search for an item, you'll get a list of results, and when you press "Done" you are shown the categories screen again. Your previous search term is still listed in the search field, but now the Search Results Button appears in the field. After tapping this, a UIPopOver is displayed, showing a text list of the results from your last search.

like image 139
mattyohe Avatar answered Nov 19 '22 23:11

mattyohe