Can I opt out of software?

UIScrollView has a cancellation mechanism, where it cancels the touch of subzones when a "scroll" is detected.

I wonder if it is possible to programmatically cancel the touch event (which has already begun).

I have a draggable view inside a scroll.
I can let the dragged view get the strokes, but I wonder how to stop receiving touch events when I want, and pass the touch events to the scroll.

+4
source share
3 answers

You might want to familiarize yourself with the cancelsTouchesInView class method of the cancelsTouchesInView class

+1
source

Well, I had a similar problem.

I solved this by turning off the scroll view when you get a touch event on its preview.

And when you think that your event is completed, you turn on the scroll view again.

If you do not enable-disable the scroll view, automatically cancels drag and drop events!

+1
source

Source: https://habr.com/ru/post/1339604/


All Articles