I have multiple collection views on one screen
In collectionView One i have normal cell like Square In collectionView two i have group cell e.g same cell but multiple surrounded by a border of Group
I need to Enable Drag and Drop between One Collection View to Another.
I am using swift 3.0.
The basic sequence involved in drag and drop is: Move the pointer to the object. Press, and hold down, the button on the mouse or other pointing device, to "grab" the object. "Drag" the object to the desired location by moving the pointer to this one. "Drop" the object by releasing the button.
An object that manages an ordered collection of data items and presents them using customizable layouts.
You can use this one from GitHub:
https://github.com/mmick66/KDDragAndDropCollectionView
And here is a nice guide for it:
http://blog.karmadust.com/drag-and-drop-between-uicollectionviews/
Drag from collectionView2:
cell.isHidden = yes
. This way the cell is not visible, but its empty space remains.Drag to collectionView1:
When the drag-able cell is above collectionView1 and is dropped:
isHidden = false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With