Over at iPhoneSDKArticles.com they’ve been running a series on how to work with UITableView. The latest one is definitely worth your attention; it goes into step by step detail on how to manage the entire experience of allowing the user to refine the list with a search field.
When the user begins searching by clicking the search text box, we will do the following:
- Set the “searching” variable to YES.
- Set the “letUserSelectRow” variable to NO, since we do not want the user to select a row when the search box is empty.
- Display a done button on the right bar.
- Start searching as the user starts typing, this time allowing the user to select a row.
- Use a different data source to bind the table, which display’s the search reults.
- Search results are displayed in a single list and they are not grouped.
- Hide the keyboard and finish searching, when the user clicks on done.
Source code link doesn’t seem to be working for us at the moment … but most of it’s in the article anyways, and the missing bits can’t be hard to fill in, we’re sure.
h/t: iPhoneKicks!
22
JAN
Share
JAN
Pingback: Code: Searching UITableView | :: superiphoneblog