Trying to search in the table with searchDisplayController
. Data filtering configured, the search dialog works. Now I want to work with a method prepareFo
self.tableView
is the main table view, so the condition
if self.tableView == self.searchDisplayController.searchResultsTableView
will never be true. But you can check if the search is active or not:
if self.searchDisplayController.active {
// index path from search table ...
} else {
// index path from main table ...
}