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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -