ios - Selections not occurring when UISearchDisplayController is being used -


i using uiseachdisplaycontroller uitableview. set programatically in viewdidload method uitableviewcontroller:

- (void)viewdidload {     [super viewdidload];     [self loadprojectsandtitles];     searchbar = [[uisearchbar alloc] initwithframe:cgrectmake(0, 0, 600, 44)];     searchdisplaycontroller = [[uisearchdisplaycontroller alloc] initwithsearchbar:searchbar                                                                 contentscontroller:self];     searchdisplaycontroller.delegate = self;     searchdisplaycontroller.searchresultsdatasource = self;     searchdisplaycontroller.searchresultstableview.allowsselection = true;     self.tableview.tableheaderview = searchbar; } 

everything working absolutely fine except when click on row when uisearchbar being used, - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath method not being called although being called when uisearch not being used. question is normal behaviour or should selection method work? if should work there suggestions why might not working?

i think forgot set

searchdisplaycontroller.searchresultsdelegate = self; 

searchresultsdelegate delegate table view in search results displayed, , didselectrowatindexpath 1 of table view delegate methods.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -