I have 2 scrollviews, the smaller scrollview needs to scroll a little bit slower (and stop on the next "page) than the larger scrollview. So basically, scrolling the larger scrollview scrolls the smaller scrollview, but at a slower pace than the larger scrollview. (confusing I know).
So scrollView1 (the larger) and scrollView2, the smaller: As you swipe scrollView1, scrollView2 is also scrolling but slower. Both having Paging enabled and their contentSizes have already been set based on scrollView2's content.
I am just having trouble calculating the offset between the 2 so they scroll perfectly.
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
if ( scrollView == scrollView1 )
{
CGFloat xOffset = (scrollView2.contentSize.width * scrollView1.contentSize.width); // the issue
[scrollView2 scrollRectToVisible:CGRectMake(xOffset, 0, scrollView2.frame.size.width, scrollView2.frame.size.height) animated:YES];
}
}