search

Home  >  Q&A  >  body text

gestureRecognizer:gestureRecognizer shouldReceiveTouch: is not called - Stack Overflow

Add a view to the scrollview and add a drag gesture to it. This causes scrollview dragging and view pan dragging gestures to conflict.
To resolve conflicts, use this function. But why wasn't it called?

漂亮男人漂亮男人2876 days ago621

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