ios - Different behavior for segue using UISearchController -
i must doing wrong here. have uitableview, , have implemented uisearchcontroller. have prototype cell linked details screen , pass selected value in prepareforsegue method.
for normal view controller, works ok, row selected , details screen pushed (i.e. slide in right).
however when there active search, using uisearchcontroller, details screen presented modally (i.e. slide bottom of screen) without uinavigationbar (so there no possibility go "back")
i not using didselectrowatindexpath since have used storyboard push details screen
why presenting animation different when same code in "prepareforsegue" being correctly called in each case:
// mark: - navigation override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) { if (segue.identifier! == "presentcontactdetail") { // pass person details selected row if let selectedrow = self.tableview.indexpathforselectedrow()?.row { let selectedperson = self.visibleresults[selectedrow] (segue.destinationviewcontroller contactdetail).personrecord = selectedperson } } }
any suggestions gratefully received.
in viewdidload of uitableviewcontroller set definespresentationcontext = true
Comments
Post a Comment