When I select a row on my UITableView
, the call to the handler is never made...
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
I create the custom cells programmatically. User interaction is enabled on my UITableView
and the data source and delegate are set to the File's Owner for the view controller the tale resides in. I am able to insert data, but touches are not detected. The cells do not even turn blue.
What am I missing?
I tried setting the table to allow selection:
tableView.allowsSelection = YES;
EDIT:
More details - I have a NSLog
in the didSelectRowAtIndexPath
and it never gets printed. The cell does not even turn blue or look selected.
I changed the cells from my custom ones to regular UITableViewCells
and I still can't select cells.
Try:
- (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tv deselectRowAtIndexPath:indexPath animated:YES];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With