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

Gracefully cancel cell reordering when application will resign active notification sent #34

Closed sibljon closed 11 years ago

sibljon commented 11 years ago

The example with the card images doesn't reflect this bug (because of the ample spacing between the cells and the status bar), but if your cells are flush against to status bar (in iPhone, at least), when the user long presses on a cell at the top, the Notification Center drawer is pulled down and the cell gets stuck in the long press state.

Here's what I mean by it getting stuck in the long press state: http://cl.ly/image/0H0y2n1M2o0Q

Pay attention to the "Groceries" cell. My finger is no longer on the screen, but the rasterized cell is stuck in place. This totally breaks the scroll view.

lxcid commented 11 years ago

This is a great finding. Although I'm not sure why we turn on and off the pan gesture recognizer in quick succession though. Hope you can help me clarify this portion. Thanks!

sibljon commented 11 years ago

Toggling the enabled property on the UIGestureRecognizer is the only way, to my knowledge, to programmatically cancel an in-progress gesture recognizer.