I have a NSCollectionView
implemented and working fine. However, when
dragging items around to re-arrange them, I'd like to accept drags only
between objects.
The current behaviour is that you can drag between objects (it opens an space) but also over an object. I hope the images below speak better. Dragging an item over #2, for example, will put it before #2. I'd like to disable this and only accept drags in between.
In the images below:
- The original state
- Item #0 dragged between #1 and #2
- Item #0 dragged over #2 (the result is the same)
CGRectIntersectsRect
, just accept if it intersect with >= 2 cell in a row. Or using position of each cell to detect between, over. I think you already think about them. I just want to know the reason why don't? – tuledev