title: UICollectionView does not always animate deceleration when overriding scrollViewWillEndDragging
body: <p>I am creating custom paging for my UICollectionView. I want some of the cells at the bottom to hang off of the edge of the screen, however, with regular paging, scrolling to the next page means that if half of the cell at the bottom of the page was showing, it will only show the other half on the next page. I want to let the cells hang off of the end, but stop the paging so that the cells hanging off of the screen are in clear view.</p>
  
  <p>So, to do this I overrode the function - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset</p>
  
  <p>If I drag for a second or two, it sees to work as expected, however, I am trying to emulate the "flick" that works so well when paging is enabled. When I flick my UICollectionView, it jumps to the targetContentOffset, rather than animates to it.</p>
  
  <p>How do I prevent this?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset {
  
      if(targetContentOffset-&gt;y &lt; 400) {
          targetContentOffset-&gt;y = 0;
          return;
      }
  
      int baseCheck = 400;
  
      while(baseCheck &lt;= 10000) {
          if(targetContentOffset-&gt;y &gt; baseCheck &amp;&amp; targetContentOffset-&gt;y &lt; baseCheck + 800) {
              targetContentOffset-&gt;y = (baseCheck + 340);
              return;
          }
          baseCheck += 800;
      }
  
      targetContentOffset-&gt;y = 0;
  }
  </code></pre>