From e26d60c210ee54587af063a03e1db919c446b422 Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Fri, 7 Aug 2015 15:06:50 +1000 Subject: [PATCH] Allow the underlying scroll view pan gestures to work as expected on iOS 9 and higher Fixes #92. --- .../LXReorderableCollectionViewFlowLayout.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m index 9688aad..b9bc00e 100755 --- a/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m +++ b/LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m @@ -502,7 +502,14 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogni if ([self.panGestureRecognizer isEqual:gestureRecognizer]) { return [self.longPressGestureRecognizer isEqual:otherGestureRecognizer]; } - + + + // Allow the underlying scroll view pan gestures to work as expected on iOS 9 and higher + if ([otherGestureRecognizer isKindOfClass:NSClassFromString(@"UIScrollViewPanGestureRecognizer")] && + [self.collectionView.gestureRecognizers containsObject:otherGestureRecognizer]) { + return YES; + } + return NO; }