I have a UITableViewController in which I added a UISearchBar as a tableHeaderView using Interface Builder. Then I added a UISearchDisplayController to nib and set up all the connections ( delegate , searchResultsDelegate , searchContentsController , searchResultsDataSource , all related to the UITableViewController ). Then I implemented all the delegation and data source methods in my code.
It works like a charm, with the exception of a strange mistake: sometimes the view of the search results table will not scroll, and I can see the flash indicator in the main view of the table behind it. I am NSLog'd searchResultsTableView and apparently this is a submatrix of the main table view, and I assume that the reason for the touch problems that I described earlier.
What is my mistake? Is it possible to use the UITableViewController with the UISearchDisplayController ? If so, how can I configure it so that the result table view is not added as a subheading of my main table view?
Update : I found this example that uses the UISearchDisplayController with the UITableViewController , and apparently the view of the lookup table is added to the main view also there. So now I do not think that my problem.
The fact is that I cannot find a significant difference between what I do and what this sample does. I just add the UISearchBar as the UITableView title to the UITableViewController and add the UISearchDisplayController to it ... It looks like iOS gets confused between the main table and the search table when trying to scroll. Do you have any ideas?
Update : Added 200 repression. Please answer only if you know what you are talking about.
pt2ph8
source share