title: UICollectionView Drag and Drop Folder Creation
body: <p>I'm using UICollectionView to create a gallery app for iOS. I'd like for users to be able to drag and drop images to reorder the gallery and to create folders (similar to the home screen on the iPhone).</p>
  
  <p>I found the following <a href="http://nshint.io/blog/2015/07/16/uicollectionviews-now-have-easy-reordering/" rel="nofollow">tutorial</a> to implement drag and drop reordering. However, I'm having an trouble figuring out where to start on the folder creation. </p>
  
  <p>What I'd like to do is implement the following scenarios:</p>
  
  <ul>
  <li>When an image is dragged around, it does not automatically reorder other images in the gallery.</li>
  <li>When an image pauses (say for .5 seconds) in the space between images, then update the layout to create a space for that image to drop into.</li>
  <li>When an image pauses (say for .5 seconds) over another image, the image highlight signifying that a folder will be created when dropped.</li>
  </ul>
  
  <p>I believe I need to use functions such as <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionView_class/#//apple_ref/occ/instm/UICollectionView/beginInteractiveMovementForItemAtIndexPath:" rel="nofollow">beginInteractiveMovementForItemAtIndexPath</a> along with a custom <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionViewLayout_class/" rel="nofollow">UICollectionViewLayout</a>, but I'm having problems figuring out how to:</p>
  
  <ul>
  <li>Delay the reordering of the images.</li>
  <li>Figuring out if an image is paused on top of another image.</li>
  </ul>
  
  <p>Any help with this would be appreciated. I'm also not opposed to any CocoaPods library that already has a lot of this in there.</p>