lxcid / LXReorderableCollectionViewFlowLayout

Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.
http://lxcid.com/
MIT License
1.86k stars 328 forks source link

Gesture configuration #86

Open mackworth opened 9 years ago

mackworth commented 9 years ago

Documentation suggestion: I wanted to change the minimumDuration of the longPress gesture after I created the layout, but I couldn't get it below 0.5 seconds. As the recognizer worked fine otherwise, I assumed other recognizers or buttons were interfering and delaying the recognition. It took me a couple of hours of debugging and searching through issues here before realizing that the recognizers aren't created until the layout is attached to a collectionView. (Thus before then, layout.longPressGestureRecognizer is nil, so assigning to its property is a no-op). Moved the setting down two lines and it works great.

Nothing wrong with that design, just wish this note had existed.

Thanks for a great framework!