From dcddd2f421045d4b7e8e876b0282195dd86f7ff0 Mon Sep 17 00:00:00 2001 From: Roman Kyrylenko Date: Tue, 3 Oct 2017 14:56:44 +0300 Subject: [PATCH 1/2] [Fix] touch delegating --- .../KolodaView/DraggableCardView/DraggableCardView.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift b/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift index 38e79ccb..bfadebc4 100644 --- a/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift +++ b/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift @@ -103,8 +103,13 @@ public class DraggableCardView: UIView, UIGestureRecognizerDelegate { addGestureRecognizer(panGestureRecognizer) panGestureRecognizer.delegate = self tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(DraggableCardView.tapRecognized(_:))) + tapGestureRecognizer.delegate = self tapGestureRecognizer.cancelsTouchesInView = false addGestureRecognizer(tapGestureRecognizer) + + if let delegate = delegate { + cardSwipeActionAnimationDuration = delegate.card(cardSwipeSpeed: self).rawValue + } } //MARK: Configurations @@ -267,6 +272,9 @@ public class DraggableCardView: UIView, UIGestureRecognizerDelegate { } public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { + if let touchView = touch.view, let _ = touchView as? UIControl { + return false + } return delegate?.card(cardShouldDrag: self) ?? true } From 98a495e9eb59ee150af896ab90dd639dfea94725 Mon Sep 17 00:00:00 2001 From: Roman Kyrylenko Date: Tue, 3 Oct 2017 14:59:14 +0300 Subject: [PATCH 2/2] [Update] version --- Koloda.podspec | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koloda.podspec b/Koloda.podspec index 987cdce2..735ae287 100644 --- a/Koloda.podspec +++ b/Koloda.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Koloda" -s.version = '4.3' +s.version = '4.3.1' s.summary = "KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS. " s.homepage = "https://github.com/Yalantis/Koloda" diff --git a/README.md b/README.md index 2d0d02f1..4064c5ec 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ KolodaView requires ARC. ------------------ ```ruby -pod 'Koloda', '~> 4.3' +pod 'Koloda', '~> 4.3.1' ``` Thread Safety