ios - Filtered uitableview doesn't call didSelectRowAtIndexPath when clicked on one of the results -
i'm having searchbar on tableview. works except when results displayed. want click on result , segue.
now click on , didselectrowatindexpath isn't called.
this uibar , searchcontroller:
_searchbar = [[uisearchbar alloc] initwithframe:cgrectmake(0, 0, 320, 44)]; _searchbar.delegate = self; searchdisplaycontroller = [[uisearchdisplaycontroller alloc] initwithsearchbar:_searchbar contentscontroller:self]; searchdisplaycontroller.delegate = self; searchdisplaycontroller.searchresultsdatasource = self; self.tableview.tableheaderview = _searchbar;
implemented delegate:
- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath
but not called when click on 1 of results.
do need add delegate?
you forgot set delegate of search results table view, searchdisplaycontroller.searchresultsdatasource = self;
searchdisplaycontroller.searchresultstableview.delegate = self;
Comments
Post a Comment