search

Home  >  Q&A  >  body text

objective-c - gestureRecognizer:gestureRecognizer shouldReceiveTouch: 没有被调用

在scrollview中 添加了一个view,并给它增加了一个拖动手势。导致scrollview的拖动和view的pan拖动手势冲突。
解决冲突是要使用该函数。但是怎么没有被调用?

漂亮男人漂亮男人2757 days ago563

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-02 09:26:05

    This method is the delegate method of UIGestureRecognizer. Have you set the delegate for your customized gesture?

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-02 09:26:05

    Just use the addTarget method, there is no need to use Delegate
    If you use Delegate, you need to set
    GestureRecognizer.delegate = xxx

    reply
    0
  • Cancelreply