The ingredients for a search function in a UITableView are more involved than just displaying a simple search field. First we need the standard UITableView. Next we need a UISearchBar which can be added to the top of the table view. But displaying the actual search results is something called the UISearchDisplayController.
This process isn’t very well documented from what I could find, so here’s how I did it successfully. Works fine in iOS 6.
For iOS 5 compatibility please see my comment at the end.
An updated version for iOS 7 is also available. I’ve recorded a screencast about this here: