lxcid / LXReorderableCollectionViewFlowLayout

Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.

Home Page:http://lxcid.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deselected after shifting around

CyberMew opened this issue · comments

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.

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.