UITapGestureRecognizer not working in UIImageView

前端 未结 9 1666
长发绾君心
长发绾君心 2021-01-03 18:16

I had the following code:

UITapGestureRecognizer *showStoryTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showNewsStory         


        
9条回答
  •  清歌不尽
    2021-01-03 18:57

    If you have already set imageView.userInteractionEnabled = YES; but the action still doesn't fire. Maybe it's because for one of superviews of imageView userInteractionEnabled is NO;

提交回复
热议问题