UIPanGestureRecognizer和collectioncell滑动冲突

override func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool { if let panGestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer { let translation = panGestureRecognizer.translationInView(collectionView!) if fabs(translation.y) > fabs(translation.x) { return true } return false } return false }

    推荐阅读