Conflicting Gesture Recognizers on UITableView

后端 未结 2 706
暗喜
暗喜 2020-12-19 18:25

I have two custom controls on my UIView, the one is the now popular sliding menu (when you slide the finger on the NavBar the view slides to the ri

2条回答
  •  甜味超标
    2020-12-19 18:41

    When I use UIGestureRecognizer on a UITableView, I met the same problem like u.Finally, I found the "cancelsTouchesInView" property in UIGestureRecognizer by this one,and its helpful.

      UIGestureRecognizer* tapGesture = [[UIGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
      **tapGesture.cancelsTouchesInView = NO;**//pass touch event to others
    

    best wishes!

提交回复
热议问题