UitextView iOS 14.2

I have programatically created UItextview and when the content has been scrolled and is decelerating it does not respond sometimes to finger touches (either a swipe or a quick flick) in the opposite direction to reverse the scroll. It responds very quickly to the trackpad using a two finger swipe to reverse the direction however.
I have been trying to debug this for days with no luck.
Has anyone else seen this behaviour?
There are several parameters involved here.

Doc states:

Because a scroll view has no scroll bars, it must know whether a touch signals an intent to scroll versus an intent to track a subview in the content. To make this determination, it temporarily intercepts a touch-down event by starting a timer and, before the timer fires, seeing if the touching finger makes any movement. If the timer fires without a significant change in position, the scroll view sends tracking events to the touched subview of the content view. If the user then drags their finger far enough before the timer elapses, the scroll view cancels any tracking in the subview and performs the scrolling itself. Subclasses can override the touchesShouldBegin(_:with:in:), isPagingEnabled, and touchesShouldCancel(in:) methods (which are called by the scroll view) to affect how the scroll view handles scrolling gestures.

Did you override touches methods ?
Does it occurs on device or on simulator (you speak of trackpad, so I guess you mean simulator ?)
If simulator,
  • note that it's just a simulator, may not react exactly as a real device.

  • Check the mouse and trackpad settings in System preferences.

Thanks for your reply Claude. I have not overridden any touches methods and am using on an iPad Pro with magic keyboard attached.
My issue is that the scroll view ignores a second swipe while decelerating as there are no controls on the view my only intention is to scroll.
If you browse using safari on iPad and scroll content up and while decelerating quickly flick back down the direction is reversed - that is what my app used to do and now does not.

My only clue is that perhaps I am doing something on the main thread - perhaps in my custom layout manager that interferes with the timer - but to test this I disabled all this drawing code and the problem is still present.

Claude I forgot to mention that the mouse and trackpad settings are normal and that my device behave as expected in other apps while scrolling including an earlier version of my own app.
to debug this I added another target to the scrolls views default panGestureRecognizer

Code Block
 self.panGestureRecognizer.addTarget(self, action: #selector(handleScrollGesture(_:)))

and print out all received dated to the console like this ;

Code Block
@objc func handleScrollGesture(_ recognizer: UIGestureRecognizer) {
        
        guard recognizer.view != nil else { return }
        switch recognizer.state {
        case .possible : print("Scroll possible")
        case .began : print("Scroll began")
       
        case .recognized : print("Scroll recognized")
        case .changed : print("Scroll changed")
        case .cancelled: print("Scroll Cancelled")
        case .failed : print("Scroll failed")
        default : print("unknown state")
        }
    }
    


and when the second flick to reverse the scroll is successful it fires as per normal but when it does not nothing is printed to the console.

UitextView iOS 14.2
 
 
Q