I have a main table view with a search display controller. I'm using a custom cell.h which implement
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
When I select the cell from main table, the code above changes the background color of this selected cell. When I choose to search from the search bar, the search display controller display the selected cell in the correct background color using
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
However, this cell which is displayed at the search display controller does not responds to didSelectRowAtIndexPath
and didDeselectRowAtIndexPath
. Other cells, on the other hand, responds to both methods.
What I want to achieve is a synchronization between the main table and the search table view at search display controller where selected cells should appear selected in both main table and search table view and yet allows selection and un-selection.
Please advice. Many thanks.