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

objective c - Can't build GCM with Protobuf in Xcode -

ember.js - EmberJS Model find not up-to-date with underlying store -

javascript - jQuery iScroll clickable list elements while retaining scroll? -