美文网首页
UIPanGestureRecognizer和collecti

UIPanGestureRecognizer和collecti

作者: jianshufei | 来源:发表于2017-07-10 17:36 被阅读0次
    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
    }
    

    相关文章

      网友评论

          本文标题: UIPanGestureRecognizer和collecti

          本文链接:https://www.haomeiwen.com/subject/dqruhxtx.html