tags:

views:

45

answers:

1

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.

+1  A: 

Try:

- (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tv deselectRowAtIndexPath:indexPath animated:YES];
}
Matt Williamson
I put an NSLog in my function and it never gets printed...
mark