Skip to content

Commit

Permalink
a bit cleaner workaround, closes Enricoza#6
Browse files Browse the repository at this point in the history
  • Loading branch information
ReDetection committed Jan 13, 2021
1 parent 07bef3d commit 3ddbe38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ extension EZNavigationControllerTransitionHelper: UIGestureRecognizerDelegate {
}

public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOf otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if gestureRecognizer == self.panGesture && ![self.unpopGesture, self.popGesture].contains(otherGestureRecognizer) {
let classname = "\(type(of: otherGestureRecognizer))"
return classname != "UIScrollViewPanGestureRecognizer"
if gestureRecognizer == self.panGesture && ![self.unpopGesture, self.popGesture, ].contains(otherGestureRecognizer) {
if let scrollView = otherGestureRecognizer.view as? UIScrollView, scrollView.panGestureRecognizer == otherGestureRecognizer {
return false
}
return true
}
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class TableDemo: UITableViewController {
return indexPath.row % 2 == 0
}

// TODO: Find a way to make this work
override func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
guard self.shouldShowLeftActions(for: indexPath) else { return nil }
return UISwipeActionsConfiguration(actions: [
Expand Down

0 comments on commit 3ddbe38

Please sign in to comment.