Теперь въехал. У меня результат поиска отображается в resultController, поэтому спасла вот такая муть... ))) Да, нужно ее допилить, но уже хоть все работает. ) Почти все... при поиске сбивается порядок картинок в таблице...
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "showDetailsSegue" && searchController.active {
if let indexPath = self.resultsController.tableView.indexPathForSelectedRow {
let destinationVC = segue.destinationViewController as! DetailsViewController
destinationVC.ralImage = self.ralImages[indexPath.row]
destinationVC.ralName = self.filteredRal[indexPath.row]
} else if let indexPath = self.tableView.indexPathForSelectedRow {
let destinationVC = segue.destinationViewController as! DetailsViewController
destinationVC.ralImage = self.ralImages[indexPath.row]
destinationVC.ralName = self.ralNames[indexPath.row]
}
}
if segue.identifier == "showDetailsSegue" {
if let indexPath = self.tableView.indexPathForSelectedRow {
let destinationVC = segue.destinationViewController as! DetailsViewController
destinationVC.ralImage = self.ralImages[indexPath.row]
destinationVC.ralName = self.ralNames[indexPath.row]
}
}
}