I accomplished this using two instances of UIScrollView . First, where the actual content is displayed, and the second (which is behind the first in z-order) is the place where I have a slower background. From there, the top UIScrollView has a delegate attached to it, which gets notified when the contentOffset changes. This delegate, in turn, programmatically sets the contentOffset background scroller multiplied by a constant to slow down the scroll relative to the foreground. So, for example, you might have something like:
// Defined as part of the delegate for the foreground UIScrollView - (void)scrollViewDidScroll:(UIScrollView *)scrollView { UIScrollView* scroll_view(static_cast<UIScrollView*>(bkg_scroller_m.view)); CGPoint offset(scrollView.contentOffset); offset.x = offset.x / 3; offset.y = offset.y / 3; // Scroll the background scroll view by some smaller offset scroll_view.contentOffset = offset; }
source share