title: How to make paging animation for a collectionView cell scrolling to center?
body: <p>I am using swift 3 to write an app which has a <code>UIViewController</code> looks like the following picture. It contains a horizontal-scrollable <code>collectionView</code> (the blue block) on the top, and its functionality is to  switch between different labels(first, prev, current, next, last...etc, the total amount of labels are not fixed). What I need to achieve is that on scrolling (or panning) the collection view, the <strong>'NEXT'</strong> or <strong>'PREV'</strong> should move (and anchor automatically) to the center with velocity similar to paging animation. How could I achieve this? Currently I use the <code>Paging Enabled</code> attribute of the <code>scrollView</code>, however this only work when there is one label in the window.</p>
  
  <p>Similar features may look like the middle "albums" section of iTunes app, which the collectionView cell would scroll to some pre-defined point automatically with some animation once it detects any swipe/pan gesture.</p>
  
  <p><a href="https://i.stack.imgur.com/HPyHw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HPyHw.png" alt="enter image description here"></a></p>