ra1028 / RAReorderableLayout

A UICollectionView layout whitch can move item with drag and drop.
MIT License
867 stars 140 forks source link

cannot scroll while dragging down #13

Open liuxuan30 opened 9 years ago

liuxuan30 commented 9 years ago

I have lots of cells out side of the screen, and while dragging, when I drag one cell to the bottom of the screen, the UICollectionView cannot scroll slowly to show more cells.

However, the demo can achieve so. I am not sure what I missed?

I looked at the code, it's related to private func beginScrollIfNeeded()

But I don't know why mine don't trigger the scroll, it goes to

else {
            self.invalidateDisplayLink()
        }

And I have no idea what's the logic while calculating fakeCellTopEdge <= offset + paddingTop + trigerInsetTop and fakeCellEndEdge >= offset + length - paddingEnd - trigerInsetEnd