views:

557

answers:

1

I have three UIScrollViews, scrollView1, scrollView2, and scrollView3. When scrollView1 is scrolled then scrollView2 should scroll horizontally with it, and when scrollView3 is scrolled then scrollView2 should scroll vertically with it. How can I do this?

+7  A: 

The UIScrollViewDelegate protocol includes scrollViewDidScroll:.

You could set the contentOffset of your subserviant scrollviews using setContentOffset in scrollView2 and scrollView3 from scrollView1's delegate's scrollViewDidScroll:

Roger Nolan
THANKS man, THANKS!!!! TTTHHHAAAAANNNKKKKSSS!!!!!!! That's exactly what I was looking for 18 hours now!!!!!!!!!!!!!
Thanks