From d3050daf8a533cd8a432525179deb00752274060 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Tue, 25 Aug 2015 12:21:27 +0800 Subject: [PATCH] make sure link's longPress gets priority response --- Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift | 6 ++++++ Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift b/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift index fb44f354..53d697a2 100644 --- a/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift +++ b/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift @@ -92,6 +92,12 @@ class ChatLeftTextCell: ChatBaseCell { extension ChatLeftTextCell: UIGestureRecognizerDelegate { func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool { + + return true + } + + func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOfGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool { + return true } } diff --git a/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift b/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift index 63a7cdd9..cdb90a17 100644 --- a/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift +++ b/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift @@ -114,6 +114,12 @@ class ChatRightTextCell: ChatRightBaseCell { extension ChatRightTextCell: UIGestureRecognizerDelegate { func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool { + + return true + } + + func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOfGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool { + return true } }