I have a view controller with this hierarchy:
View Controller:
- UIScrollView (scrollable horizontally)
- UITableView (scrollable vertically)
I want to forward the vertical scrolls from my UIScrollView
to the sibling UITableView
, so that when the user scrolls up on the UIScrollView
, the UITableView
will scroll up instead. What would be the best way to do it?
I have tried these:
- Detecting the vertical scroll in
scrollViewDidScroll
, it doesn't get called because the contentOffset of the scroll view does not change. - Subclassing the
UIScrollView
and overridingtouchesMoved
, I can't forward the touches to the table view because I don't have a reference to it in this class.