这里主要针对FDFullscreenPopGesture
示例处理,其他同类手势即可按照此方法处理。
JXCategoryView
版本需要 1.3.4 版本及以上;
- 遵从
JXCategoryCollectionViewGestureDelegate
协议
self.categoryView.collectionView.gestureDelegate = self
- 实现相关代理方法
- (BOOL)categoryCollectionView:(JXCategoryCollectionView *)collectionView gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
if (collectionView.contentOffset.x <= 0) {
if ([otherGestureRecognizer.delegate isKindOfClass:NSClassFromString(@"_FDFullscreenPopGestureRecognizerDelegate")]) {
return YES;
}
}
return NO;
}
-
遵从
JXCategoryListContainerViewDelegate
协议 -
实现相关代理方法
- (UIScrollView *)scrollViewInlistContainerView:(JXCategoryListContainerView *)listContainerView {
//返回一个继承自`UIScrollView`的自定义类,然后自己在自定义类内部,处理手势。
return customScrollView;
}