How can I modify touch and drag sensitivity?

ios

Solution

It turns out that the default `UIScrollView` scrolling is correct, but the problem was simply that if the user touches a button, the button gets the touch event, not the ScrollView, and this was messing me up.

So the solution to this problem that I came to was to disable the buttons and then the ScrollView receives the touch. I then use a custom subclass of `UIScrollView` in which I implement `TouchesBegan` and `TouchesEnded` methods. In these methods I record where the user touches down and up, and if these are near each other and over a (disabled) button, I then do the action that that button does.

This works perfectly, but I think it's surely more work than ought to be necessary. So maybe my question should be: is there a way to leave the buttons enabled but make it so that the scroll view gets touch events before its subviews, scrolls as desired, and then relays the events to the subviews?

Problem

I'm working on an app for a physically challenged population, and in testing we're finding that they have a lot of trouble with the default touch-drag functionality. We've got a screen where there's a grid of icons in a UIScrollView. You can touch an icon to activate it, and you can touch-drag anywhere in the grid, including on an icon, to scroll the grid and see more icons. In iOS, the default behavior is that you touch and drag in one motion. This requires a certain amount of physical coordination, and if you touch and pause and then drag, or drag a little off course, the system treats this as a simple touch. So our testers are doing things like: Touch, pause for a moment, and then try to drag. The grid doesn't scroll. If they were trying to scroll by dragging an icon, when they release the touch, it activates the icon instead. Touch, try to drag vertically (the only supported direction), but instead veer a little bit horizontally first. Same outcome as above. So the question is: is there a way to override the touch processing to build in more tolerance for slowness or drag inaccuracy, so that the app will correctly interpret the above actions as scroll requests?

Original source