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

UICollectionView scroll no longer works under iOS 9.0b #92

Open tonyarnold opened 8 years ago

tonyarnold commented 8 years ago

Using LXReorderableCollectionViewFlowLayout with a UICollectionView under iOS 9.0b (currently beta 5) causes scrolling of the collection view to be disabled. I've tried disabling the new iOS 9 rearrangement API like so:

if ([self respondsToSelector:@selector(setInstallsStandardGestureForInteractiveMovement:)]) {
    [self setInstallsStandardGestureForInteractiveMovement:NO];
}

However this has no effect. I'll do some digging over the weekend, but given that I still need to support iOS 8.x clients, I can't afford to lose LXReorderableCollectionViewFlowLayout just yet.

adamcumiskey commented 8 years ago

@tonyarnold I found out the root cause of this. It seems as though the gesture recognizers are getting added to the same collection view twice. This causes the shouldRecognizeSimultaneouslyWithGestureRecognizer method to fail when comparing the scroll gesture to the duplicated reordering gestures.

My fix was to add a check that only adds the custom gestures once. https://github.com/winkapp/LXReorderableCollectionViewFlowLayout/pull/2/files

EldhoseIssac commented 8 years ago

@adamcumiskey Thanks this fix worked for me too.

BrettSchumann commented 8 years ago

Thank you @adamcumiskey . Solved the recent problem that I have been having too.