I have an application that usually lists Guilt throughout the application (full screen or in smaller UIViews). I usually call this ViewController, highlighting the view, assigning the / etc delegate to my main ViewController, and then populating the data through this delegate.
From the main view that wants to display the fault on the screen:
wineListViewController = [[WineListViewController alloc] initWithWines:nil]; wineListViewController.navigationController = self.navigationController; self.winesTableView.dataSource = wineListViewController; self.winesTableView.delegate = wineListViewController;
This is great, but now I am creating a search aspect, and I want to use the same Viewcontroller to display the results, as I have some complex rules in cellForRowAtIndexPath, etc.
However, UISearchDisplayController wants to use its own tableView, which would mean that I would have to duplicate all my code from WineListViewController (heightForRow, cellForRow) just to display the same path. Is there a way to connect my WineListViewController to a UISearchDisplayController so that I don't duplicate the code?
source share