title: scrollViewWillEndDragging:withVelocity:targetContentOffset: not working on the edges of a UISCrollView
body: <p>I'm trying to implement a custom tab bar which is scrollable and has paging at each tab bar item. For that i'm using the delegate scrollViewWillEndDragging:withVelocity:targetContentOffset: which works perfectly with one problem.</p>
  
  <p>The way my paging works is, if the contentOffset is near the right item, it the targetContentOffset changes to the offset of that item. Same thing for the left side.</p>
  
  <p>The problem is, whenever I'm at at the left half of the first item and the right of the last (the scroll view works horizontally) it's supposed to go to ContentOffset 0 and the content offset of the rightmost item (minus the ones on screen), but it doesn't.</p>
  
  <p>I checked with the debugger and the targetContentOffset->x is indeed 0 (in the first case - left of the leftmost item). So the problem is the UIScrollView not scrolling there. I'm lost.</p>
  
  <p>Here is my implemented delegate:</p>
  
  <pre><code>- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView
                   withVelocity:(CGPoint)velocity
            targetContentOffset:(inout CGPoint *)targetContentOffset{
       NSInteger index = lrintf(targetContentOffset-&gt;x/self.tabWidth);
       targetContentOffset-&gt;x = index * self.tabWidth;
  }
  </code></pre>
  
  <p>Here is the diagram explaining what i want to do.</p>
  
  <pre><code>|-------|-------|-------|-------|-------|-------|-------|
  |       |       |       |       |       |       |       |
  |       |       |       |       |       |       |       |
  |_______|_______|_______|_______|_______|_______|_______|
  
          |_______________________________________|
           where it is and i scroll it to the left
  
     &lt;----|
  
     |_______________________________________|
                where it would stop
  
  |_______________________________________|
          where i want it to stop
  </code></pre>