lukescott / DraggableCollectionView

Extension for the UICollectionView and UICollectionViewLayout that allows a user to move items with drag and drop. --- HELP WANTED --- Looking for maintainer and help with the experimental branch.
MIT License
549 stars 175 forks source link

Unmoveable objects support? #6

Closed AndrewHartAR closed 11 years ago

AndrewHartAR commented 11 years ago

I'm going to make a request here which is maybe a little complicated but crucial to my usage.

The last item in section 0 is a button. The idea is, I want the user to be able to switch around all the other icons, but have them not able to put any icons after that particular one.

I know this is kind of difficult - the situation where it's mid-way through is probably impossible, because it has to move at some point. But would you be able to think of a reasonable way to implement a feature where I could make sure that the last object doesn't move?

lukescott commented 11 years ago

Just added support for this. Try 5f3dbf27a56b1f678df89bf9a11f8d3b5c8d5995 (last commit). Needed this in a project I'm doing as well, just hadn't gotten around to it yet.

AndrewHartAR commented 11 years ago

Great implementation of this, thanks.