How to detect a tap gesture in subviews

后端 未结 3 792
梦谈多话
梦谈多话 2020-12-15 08:18

Quick question: how do i detect if a tap gesture recognizer is within a subview of the view it is added to? Eg. if i click on an object such as a square that has been added

3条回答
  •  一生所求
    2020-12-15 08:47

    you can use the requireGestureRecognizerToFail: to recognize the tap on subview please refer this code

提交回复
热议问题