Reputation: 4582
imgView is a UIImageView that is added as a subview to a custom UITableViewCell class. The action isn't being called when the image is tapped.
[imgView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(openMedia:)]];
Upvotes: 2
Views: 2025
Reputation: 2146
UIImageView ignores user events by default. You need to enable them with:
imgView.userInteractionEnabled = YES;
Beware, you are also leaking your gesture recognizer.
Upvotes: 15