I’m in the middle of trying to debug an issue with a new app, and something isn’t right. In the app, I’m setting up custom UITableViewCells by adding 2 UILabels and 1 UIImageView directly to the cell.contentView
In my app, certain table view cells werent selectable ( they werent responding to tap events ). The 2nd cell on the screen was always never selectable, and then random other cells also werent selectable.
In my effort to debug, I stripped everything down the following bare essentials of code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"ReviewCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
cell.textLabel.text = @"foo";
return cell;
}
Even this is generic, boiler plate code, that looks like the following:

not all the cells are selectable.
What am I missing?
update
as an updated here is my row selection code if interested
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
ReviewWebViewController *rvc = [[ReviewWebViewController alloc] initWithReview:[self.reviews objectAtIndex:indexPath.row]];
[self.navigationController pushViewController:rvc animated:YES];
[rvc release], rvc=nil;
}
What does your view hierarchy look like? Two things come to mind: either there are other views besides the table view that could be intercepting the touch events, or the table view itself is outside of its superviews frame (and clipping is turned off).
Long story short – lot of suggestions focusing on the implementation of the table view itself, I’d take a look at everything around it.