Skip to content

Commit

Permalink
Merge pull request #326 from freaqed/feature/fix-gesture-tap
Browse files Browse the repository at this point in the history
Feature/fix gesture tap
  • Loading branch information
rnkyr authored Oct 3, 2017
2 parents fd177d0 + 98a495e commit 9736f0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Koloda.podspec
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ KolodaView requires ARC.
------------------

```ruby
pod 'Koloda', '~> 4.3'
pod 'Koloda', '~> 4.3.1'
```

Thread Safety
Expand Down

0 comments on commit 9736f0e

Please sign in to comment.