Version 1.0, 2013-07-24
"AdvancedTableSearch" demonstrates how to search contents of a table view using UISearchDisplayController.
iOS 6.0 SDK or later
iOS 6.0 or later, Automatic Reference Counting (ARC)
"AdvancedTableSearch" demonstrates how to use the UISearchDisplayController object in conjunction with a UISearchBar, effectively filtering in and out the contents of that table. If an iOS application has large amounts of table data, this sample shows how to filter it down to a manageable amount so that users to scroll through less content in a table.
This sample is continuation of the "TableSearch" sample, yet provides a more advanced search algorithm on a more complex data source. Instead of simple string comparisons to filter out search results, this advanced version uses "filteredArrayUsingPredicate" on the NSArray of objects. To perform a search across multiple fields of an NSObject subclass, this sample makes use of compound predicates (NSCompoundPredicate) and NSExpressions to create a more advanced search algorithm.