jasnig / ZJScrollPageView

网易新闻, 腾讯视频, 头条 等首页的滑块视图联动的效果OC版的简单方便的集成, 滑块 segmentVIew, scrollViewController(Providing an easy way to reach the effect that "the segment scrolls with the content")
MIT License
1.11k stars 197 forks source link

ios8.0 gesture conflict crash #15

Closed heemoe closed 7 years ago

heemoe commented 8 years ago
- (void)commonInit {

    if (self.parentViewController.parentViewController && [self.parentViewController.parentViewController isKindOfClass:[UINavigationController class]]) {
        UINavigationController *navi = (UINavigationController *)self.parentViewController.parentViewController;

        if (navi.interactivePopGestureRecognizer) {
            navi.interactivePopGestureRecognizer.delegate = self;
            [self.collectionView.panGestureRecognizer requireGestureRecognizerToFail:navi.interactivePopGestureRecognizer];
        }
    }
//    // 发布通知 默认为0
//    [self addCurrentShowIndexNotificationWithIndex:0];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveMemoryWarningHander:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
//    [self.collectionView addObserver:self forKeyPath:kContentOffsetOffKey options:NSKeyValueObservingOptionNew context:nil];
}

crash when swipe back to a view then do swipe gesture on this view. removed the above code is work. but i don't know why ...

jasnig commented 8 years ago

ok, I am going to check this problem when I am free of time. Thanks for your reminder.