I don't think you actually need a Search Display Controller here. All you need is a table view (probably a UITableViewController
) and UISearchBar
. The table view displays the contents of an array containing the data. Whenever the search query changes, you update that array accordingly, and reload the tableView to display the updated array data. This will give you the filtering feel that you want.
To display the data in the table view you'd use
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
and to get the query as the user types you'd use
- (BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
After you've filtered the array that is the data source, you call [self.tableView reloadData]
.
I went ahead and whipped together a sample project with the methods implemented, so it's a little more clear what I mean. Hope this works out for ya.