title: iOS: How sync two UIScrollview
body: <p>I have two horizontal <code>UIScrollview</code>s. I want to synchronise their scrolling when user drag fingers in either of them. Here is my code:</p>
  
  <pre><code>self.topScrollView = [[UIScrollView alloc] initWithFrame:CGRectZero];
  self.topScrollView.delegate = self;
  self.topScrollView.bounces = YES;
  
  self.bottomScrollView = [[UIScrollView alloc] initWithFrame:CGRectZero];
  self.bottomScrollView.delegate = self;
  self.bottomScrollView.bounces = YES;
  ...
  
  - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
  {
      if (scrollView == self.topScrollView)
      {
          self.bottomScrollView.delegate = nil;
      }
      else
      {
          self.topScrollView.delegate = nil;
      }
      ...
  }
  
  - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
  {   
      ...
      self.topScrollView.delegate = self;
      self.bottomScrollView.delegate = self;
  }
  
  - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
  {
      ...
      self.topScrollView.delegate = self;
      self.bottomScrollView.delegate = self;
  }
  
  - (void)scrollViewDidScroll:(UIScrollView *)scrollView
  {
      // Sync the two scroll views
      if (scrollView == self.topScrollView)
      {
          [self.bottomScrollView setContentOffset:scrollView.contentOffset animated:NO];
      }
      else
      {
          [self.topScrollView setContentOffset:scrollView.contentOffset animated:NO];
      }
      ...
  }
  </code></pre>
  
  <p>The two scroll views do scroll synchronously, however, the problem is all the bouncing and deceleration are gone. The whole scrolling movement becomes really rigid. If I remove all the syncing code, then each scroll view works just fine individually.
  So, what is the problem? Or can <code>UIScrollView</code> not be synchronised?</p>