title: UICollectionView change Drop Placeholder index path
body: <p>I would like to implement the following UX using Drag &amp; Drop. Brief: the user should be able to insert an item only at the end.  </p>
  
  <ol>
  <li>User may drag an item from whatever source and point it on a Collection View.</li>
  <li>When the item hangs above the view, the placeholder appears in the specific position, e.g. at the end.</li>
  <li>When user releases the item, it animates to the placeholder's index.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/1Ywty.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Ywty.png" alt="Drag &amp; Drop UX example - inserting at the end"></a></p>
  
  <p>I can implement the step 3 adopting the <a href="https://developer.apple.com/documentation/uikit/uicollectionviewdropdelegate" rel="nofollow noreferrer"><code>UICollectionViewDropDelegate</code></a>:</p>
  
  <pre><code>func collectionView(
      _ collectionView: UICollectionView,
      performDropWith coordinator: UICollectionViewDropCoordinator) {
  
      // ...
      coordinator.drop(item, toItemAt: endIndexPath)
  }
  </code></pre>
  
  <p><strong>The problem is to change the placeholder index</strong>, which is under the drag item by default. We could use <a href="https://developer.apple.com/documentation/uikit/uicollectionviewdropdelegate/2897375-collectionview" rel="nofollow noreferrer"><code>collectionView(_:dropSessionDidUpdate:withDestinationIndexPath destinationIndexPath:)</code></a> to provide a proposal. But there is no variable to specify index path in <a href="https://developer.apple.com/documentation/uikit/uicollectionviewdropproposal" rel="nofollow noreferrer"><code>UICollectionViewDropProposal</code></a>.</p>