Custom Cell Reorder Behavior in CollectionView : <p>I am able to reorder my collectionView like so:</p>

<p><a href="https://i.stack.imgur.com/BbqAL.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/BbqAL.gif" alt="enter image description here"></a></p>

<p>However, instead of all cells shifting horizontally, I would just like to swap with the following behavior (i.e. with less shuffling of cells):</p>

<p><a href="https://i.stack.imgur.com/HLhAO.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/HLhAO.gif" alt="enter image description here"></a></p>

<p>I have been playing with the following delegate method:</p>

<pre><code>func collectionView(_ collectionView: UICollectionView, targetIndexPathForMoveFromItemAt originalIndexPath: IndexPath, toProposedIndexPath proposedIndexPath: IndexPath) -&gt; IndexPath
</code></pre>

<p>however, I am unsure how I can achieve custom reordering behavior. </p>
