title: How to detect touches on UIImageView of UITableViewCell object in the UITableViewCellStyleSubtitle style
body: <p>I am using the <code>UITableViewCell</code> object in the <a href="https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html" rel="nofollow noreferrer"><code>UITableViewCellStyleSubtitle</code></a>
   style (i.e an image view on the left, text label in bold and under that a detail text label) to create my table. Now I need to detect touches on the <code>UIImageView</code> and also to know the indexpath/cell in which the image view was clicked. I tried using </p>
  
  <pre><code>cell.textLabel.text = @"Sometext";
  NSString *path = [[NSBundle mainBundle] pathForResource:@"emptystar1" ofType:@"png"];
  UIImage *theImage = [UIImage imageWithContentsOfFile:path];
  cell.imageView.image = theImage;
  cell.imageView.userInteractionEnabled = YES; 
  </code></pre>
  
  <p>But it's not working. Whenever the image is clicked, <code>didSelectRowAtIndexPath:</code> is called. I don't want to create a separate <code>UITableViewCell</code> and add a custom button to it. Is there any way to detect touches on the <code>UIImageView</code> itself?</p>