iphone - How to control the searchResultsTableView of a UISearchDisplayController? -


I wonder how to control the table view used by UISearchDisplayController You < Code> searchResultsTableView UISearchDisplayController because it is a read-only property.

I have tried to overlay UITableView to searchResultsTableView . It works just once, but as soon as you try to do another search, the real searchResultsTableView is again on the top (I mean, you have some text in searchBar If you type, your custom table view is at the top and displays the search results, after which you press the cancel button. Now, if you repeat it, your custom table will not be displayed and the UISearchDisplayController's SearchResultTableView head Will).

Of course, you can try without the UISearchDisplayController , but I trust the benefits of this class, I just want to customize the tableview I am

You have TableViewDataSource property at UISearchDisplayController , It produces the data source UITableViewCell . Apply the UITableViewDataSource protocol and you have control over the optimization of the table view in the method:

 - (UITableViewCell *) Table view: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) Index   


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -