I had the following code:
UITapGestureRecognizer *showStoryTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showNewsStory:)];
[showStoryTapRecognizer setDelegate:self];
[self.storyImageView_ addGestureRecognizer:showStoryTapRecognizer];
[showStoryTapRecognizer release];
This however doesn't trigger the showNewsStory, why is this? I have enabled userInteraction in the image view.
You should enable user interaction for UIImageView
object:
[self.storyImageView_ setUserInteractionEnabled:YES];
Try to remove the
[showStoryTapRecognizer setDelegate:self];
I don't think UITapGestureRecognizer
has its delegate methods as far as I know.