kingsic / SGPagingView

A powerful and easy to use segment view 【QQ、淘宝、微博、腾讯、网易新闻、今日头条等标题滚动视图】
MIT License
1.58k stars 285 forks source link

关于侧滑返回手势 #25

Open JianMingFu opened 7 years ago

JianMingFu commented 7 years ago

应该是将pop返回手势屏蔽掉了,可否打开而不引起手势冲突

gaoruiqing187 commented 7 years ago

我也遇到这个问题了,怎么解决的

JianMingFu commented 7 years ago

这个问题不解决么。

XiMuYouZi commented 7 years ago

下载拖入项目里面就行了 http://7xslqw.com1.z0.glb.clouddn.com/UIScrollView+slideBack.zip

JianMingFu commented 7 years ago

demo 中已提供了相应的侧滑返回手势处理方法

YuStephen commented 6 years ago

没有效果啊?楼上的是怎么解决的啊

FengZhiZhang commented 5 years ago

没有效果啊?楼上的是怎么解决的啊

我也遇到相同问题,FDFullscreenPopGesture 也没有办法解决。

jiaohonganGitHub commented 5 years ago

我是把collectionView的panGestureRecognizer传了出来 然后设置 [self.pageContentCollectionView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer]; 再然后

FengZhiZhang commented 5 years ago

嗨,self.pageContentCollectionView.panGestureRecognizer 你是在collectionView的哪个地方传出来了呢?

jiaohonganGitHub commented 5 years ago

嗨,self.pageContentCollectionView.panGestureRecognizer 你是在collectionView的哪个地方传出来了呢?

给SGPageContentCollectionView加个属性panGestureRecognizer
实现文件里写个get方法

pragma mark - - - get

FengZhiZhang commented 5 years ago

完美,谢谢楼上,✨✨

Free-am commented 5 years ago

也可以不用新增属性传出,我是遍历SGPageContentCollectionView的subviews,取的子scrollview的panGestureRecognizer属性直接设置的。有效。✅

liuyujie commented 4 years ago

1.给SGPageContentCollectionView加个属性panGestureRecognizer 把 collectionView 的 panGestureRecognizer 传了出来

实现文件里写个get方法

#pragma mark - Get panGestureRecognizer

- (UIPanGestureRecognizer *)panGestureRecognizer{
    return _collectionView.panGestureRecognizer;
}

2.然后设置 [self.pageContentCollectionView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer];

3.在ViewController的代理中添加如下代码:

- (void)pageContentCollectionView:(SGPageContentCollectionView *)pageContentCollectionView index:(NSInteger)index{
    if (index == 0) {
        self.navigationController.interactivePopGestureRecognizer.enabled = YES;
    } else {
        self.navigationController.interactivePopGestureRecognizer.enabled = NO;
   }
}

OK 解决了