I have to do something wrong. I have a UITableView and implemented a UISearchController. I have a Prototype cell associated with the details screen and passing the selected value in the prepareForSegue method.
For a normal viewing controller, everything works fine, a row is selected, and the details screen is pressed (i.e. slide to the right).
However, when there is an active search using the UISearchController, the detail screen is presented modally (ie, shifted from the bottom of the screen) without a UINavigationBar (so there is no way to go back)
I do not use didSelectRowAtIndexPath since I used the storyboard to click the details screen
Why is the presentation animation different when in each case the same code is correctly called in "prepareForSegue":
// MARK: - Navigation override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if (segue.identifier! == "PresentContactDetail") { // pass person details from selected row if let selectedRow = self.tableView.indexPathForSelectedRow()?.row { let selectedPerson = self.visibleResults[selectedRow] (segue.destinationViewController as ContactDetail).personRecord = selectedPerson } } }
Any suggestions gratefully received.
source share