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

Paging Support #10

Open mRs- opened 11 years ago

mRs- commented 11 years ago

I would like to have a Paging Support for this awesome Addition.

I think it have to be implemented in the handlePanGesture: method with a "pagingEnabled" property.

lukescott commented 11 years ago

This is a bit tricky. handleScroll: does the actual scrolling on a timer. You would probably have to disable handleScroll: and implement the paging in handlePanGesture. A bit tricky, but doable. I would imagine you'd want to only have it paginate when the user moves toward and is inside the edge offset - you wouldn't want it advancing to the next page if they were moving away from the edge.

lukescott commented 11 years ago

I've played with this a bit. My first attempt was to change the CADisplayLink's frameInterval to 60 (1 per second) and up the distance to a full page width. Not quite working yet.

lukescott commented 11 years ago

If anyone wants to implement this, please send a pull request.