mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-25 00:15:28 +01:00
Don't block vertical pan gestures
This commit is contained in:
parent
2f9506a8b8
commit
b86341f44c
@ -215,7 +215,9 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
|||||||
headerView.addGestureRecognizer(tap)
|
headerView.addGestureRecognizer(tap)
|
||||||
|
|
||||||
// Without this the swipe gesture registers on the cell below
|
// Without this the swipe gesture registers on the cell below
|
||||||
headerView.addGestureRecognizer(UIPanGestureRecognizer(target: nil, action: nil))
|
let gestureRecognizer = UIPanGestureRecognizer(target: nil, action: nil)
|
||||||
|
gestureRecognizer.delegate = self
|
||||||
|
headerView.addGestureRecognizer(gestureRecognizer)
|
||||||
|
|
||||||
headerView.interactions.removeAll()
|
headerView.interactions.removeAll()
|
||||||
if section != 0 {
|
if section != 0 {
|
||||||
@ -1229,3 +1231,13 @@ private extension MasterFeedViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension MasterFeedViewController: UIGestureRecognizerDelegate {
|
||||||
|
func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||||
|
guard let gestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
let velocity = gestureRecognizer.velocity(in: self.view)
|
||||||
|
return abs(velocity.x) > abs(velocity.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user