The question is a little bit weird, but that’s what I need 😉
Usually, when a UIScrollView is scrolling, if you touch the view, it stops immediately, but that’s the behavior I want to change.
I’ve subclassed UITableView and overriden the touches* method, but while the table is scrolling no touches* events are called. As I’ve read in the Apple Documentation, UIScrollView (which is the parent class of UITableView) doesn’t forward those events.
What I want is to detect that touch (which will stop the scroll in a ordinary scenario) but keep the UIScrollView scrolling.
So, instead stopping the scroll I want to have a method which is going to be called.
When
scrollViewDidEndDragging:willDecelerate:, add a transparent view above the table view withuserInteractionEnabledthat intercepts touches. Then onscrollViewDidEndDecelerating:, remove it to restore normal interaction with the table view. Wire up touch handlers on the overlay to get callbacks.