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
}
网友评论