Reputation: 979
I am getting UISearchResultsTableView as tableView of
(void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView
How do I handle this. I can not refer UISearchResultsTableView on the documentation.
I initialized the search display controller from my view controller (which is an instance of UITableViewController) as describe on http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UISearchDisplayController_Class/Reference/Reference.html.
Is there any thing to do more than in documentation??? Please help..
Upvotes: 2
Views: 2687
Reputation: 8808
UISearchResultsTableView is a private subclass of UITableView, which is why it's not in the documentation. As the method declaration you pasted in indicates, you should be treating tableView as a UITableView.
You need to populate the tableView in the usual manner (using the UITableViewDataSource methods, such as –tableView:cellForRowAtIndexPath:, etc.). Get the actual text being searched for by requesting [searchBar text] from the search display controller.
You can find out when a user has typed by implementing the UISearchDisplayDelegate methods.
That's a general overview, and it's all documented in the link you mentioned and related documents. If you would like more specific help you will need to post code and a more specific question.
Upvotes: 1