0

I have a problem with my UISearchDisplayController.

My view is build with a tableview and a uisearchdisplaycontroller on it. When the user tap on the search bar (that is displayed inside the navigation bar) it opens and shows the suggestions (that are fetched via json). When the user performs the search, tapping on "search" via the keyboard I need that when he taps on a result (that is on the table but with different cell style and identifier) the tap is recognized by the searchdisplaycontroller but not by my app code.

Notice that didSelectRowAtIndexPath: is not called when tapping, but instead my app shows again the search bar in editing mode.

How can I disable this behaviour?

zerbfra
  • 190
  • 12
  • Sorry but I read this question at least 5 times and still don't understand what you are asking for? – Sam B Jan 25 '14 at 18:13
  • When i shows results of my search, if i tap on a result the searchdisplaycontroller reopens the searchbar in editing mode (and so you can perform a new search) instead of calling didSelectRowAtIndexPath: – zerbfra Jan 25 '14 at 18:22
  • So you do your search and display the filtered search in a UITableView, when you click on any of the tableView cells somehow your searchbar opens up in editing mode as if someone clicked it? Is that what you are seeing? How is clicking on a UITableCell connected to your UISearchBar? – Sam B Jan 25 '14 at 18:27
  • yes: exactly! the filtered search is not a filtered search: it display differents results not in the table that's displayed after the search button pression. Tapping on uitablecell is recognized by 'didSelectRowAtIndexPath' but this method is not called! Where I have to look for what you're saying? – zerbfra Jan 25 '14 at 18:29
  • Without seeing your code I have a feeling you didn't implement UISearchBar correctly. Either the delegates are missing or the resulting array is not getting narrowed down. I would suggest to google "uisearchbar tutorial" and play around with them first. – Sam B Jan 25 '14 at 18:34
  • ok thanks, i will take a look but i think i implemented it correctly ;) – zerbfra Jan 25 '14 at 18:37
  • here the new question with code: http://stackoverflow.com/questions/21363419/uisearchdisplaycontroller-strange-behaviour-with-searchresultstableview-and-self – zerbfra Jan 26 '14 at 13:02

0 Answers0