mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 16:26:04 +00:00
Let a left-edge swipe reveal the timeline over an article
The article is a UIPageViewController, and a no-op pan recognizer on its internal scroll view refuses simultaneous recognition within 40pt of the left edge, so swiping from there doesn't page back and navigate back at the same time. It refused every other recognizer there too, including the split view's reveal gesture. The swipe did nothing over the article while it still worked alongside the toolbars, where the page view controller isn't under the touch. Narrow the refusal to the page view controller's own pan. Paging is still held back near the edge, and everything else gets the touch. Found on an unfolded iPhone Duo, where the article fills a 669pt-wide expanded split view and the timeline is otherwise only reachable from the sidebar button. Written with help from Claude Code.
This commit is contained in:
1 parent
d9ec7df6f9
commit
84d894d4d6
1 file changed
+5
-3
@@ -576,11 +576,13 @@ extension ArticleViewController: UIGestureRecognizerDelegate {
|
||||
}
|
||||
|
||||
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
let point = gestureRecognizer.location(in: nil)
|
||||
if point.x > 40 {
|
||||
// Paging is the only thing to hold back near the left edge. Refusing every other
|
||||
// recognizer there also blocked the split view's reveal gesture, so an edge swipe
|
||||
// did nothing over the article while it still worked alongside the toolbars.
|
||||
guard otherGestureRecognizer === pageViewController.scrollViewInsidePageControl?.panGestureRecognizer else {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return gestureRecognizer.location(in: nil).x > 40
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user