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

Deselected after shifting around #72

Closed CyberMew closed 10 years ago

CyberMew commented 10 years ago

My cell that I am currently shifting stays selected, but after I shifted it around and set it down, it automatically deselects. Why did this deselection happen?

This only happens on the one I set down. All others remains selected, if any.

lxcid commented 10 years ago

When I designing this component, I specifically followed the old iBook app as close as possible. So most decisions are based on how the old iBook app behaves.

When we "lifted" the cell so to speak, the cell is automatically unhighlighted by the long press gesture recogniser, as its - [UIGestureRecognizer setCancelsTouchesInView:] is defaulted to YES. (See WWDC 2014 Session 235 for more details) You likely able to prevent the cancellation from happening by setting the exposed - [LXReorderableCollectionViewFlowLayout longPressGestureRecognizer]'s cancelsTouchesInView property to NO, but will have to end up have to modify the component internal state management to make it work to your liking.

Unfortunately, this feature is not considered at the moment.