I have a standard UITableView
which is populated with custom cells which are displayed using a UIImageView
. I could tap on the images which would fire the UITableView's
method:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
However I wanted to enable pinch zooming on these images which requires nesting the UIImageView
in a UIScrollView
, so that's what I did. It looks like this:
@interface SMLargeGalleryCell : UITableViewCell
@property (strong, nonatomic) UIImageView *assetImageView;
@property (strong, nonatomic) UIScrollView *scrollView;
@end
However, now when I tap on the images, the UITableView
no longer receives a call to didSelectRowAtIndexPath
. If I tap BETWEEN the cells, the event will fire. The issue seems to be that the UIScrollView
is not forwarding the events.
How can I make this happen?
I'm thinking something along the lines of this (although I know this is ridiculous):
-(IBAction)myScrollViewAction:(id)sender{
self.scrollView.parentTableView didSelectRowAtIndexPath.....;
}
What am I missing here?
Is this something that has to do with responder chain?