Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shorten the touch delay in a UIScrollView?

I'm looking to shorten the touch delay on a UIScrollView, but I don't want to use setDelaysContentTouches:NO; I still want there to be a slight delay but my users are complaining about it being too long.

Is there a way to do this?

like image 303
Missing.Matter Avatar asked Jun 20 '10 18:06

Missing.Matter


1 Answers

The doc says

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:withEvent:inContentView:, pagingEnabled, and touchesShouldCancelInContentView: methods (which are called by the scroll view) to affect how the scroll view handles scrolling gestures.

So i think there is no easy way to do it. You probably have to reimplement the whole timer system in those methods.

like image 115
Zoleas Avatar answered Oct 12 '22 23:10

Zoleas