Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Searching in Tables

If you’ve got a table view displaying any significant amount of data, you owe it to your users to give them the means to navigate around easily. There’s nothing more frustrating than having to scroll through hundreds of entries in search of the one that you’re after.

Previously you’ve looked at adding indexes to the tableView; that’s a good way of enabling the user to jump between sections. But sometimes even that’s not enough. Wouldn’t it be much better if you could provide a means of searching the content of the table so the user could find the row for which they were looking?

Fortunately in iOS 3 Apple introduced the UISearchDisplayController class and its associated delegate protocols. This class makes implementing search in table views almost trivially easy; building the same functionality from scratch would be significantly more work.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial