From 6e47a33ec2bcf37c18e09dec65b9865895c2e6fb Mon Sep 17 00:00:00 2001 From: Brody Roberts Date: Mon, 1 Dec 2025 10:00:17 -0800 Subject: [PATCH 1/4] Done --- Sources/FlowStack/View+InteractiveDismiss.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Sources/FlowStack/View+InteractiveDismiss.swift b/Sources/FlowStack/View+InteractiveDismiss.swift index 0ed2167..8219f49 100644 --- a/Sources/FlowStack/View+InteractiveDismiss.swift +++ b/Sources/FlowStack/View+InteractiveDismiss.swift @@ -214,8 +214,8 @@ class InteractiveDismissCoordinator: NSObject, ObservableObject, UIGestureRecogn private func update(offset: CGPoint, isEdge: Bool, hasEnded: Bool) { isUpdating = true onPan(offset) - - let shouldDismiss = offset.y > threshold || (offset.x > threshold && isEdge) + print("🦦 offset.y \(offset.y). threshold \(threshold)") + let shouldDismiss = abs(offset.y) > threshold || (offset.x > threshold && isEdge) if shouldDismiss != isPastThreshold && shouldDismiss { impactGenerator.impactOccurred() } @@ -237,9 +237,11 @@ class InteractiveDismissCoordinator: NSObject, ObservableObject, UIGestureRecogn func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { guard gestureRecognizer == panGestureRecognizer, let scrollView = scrollView else { return true } - guard panGestureRecognizer.translation(in: scrollView).y > 0 else { return false } - - return scrollView.contentOffset.y - 5 <= -scrollView.contentInset.top + if panGestureRecognizer.translation(in: scrollView).y > 0 { + return scrollView.contentOffset.y - 5 <= -scrollView.contentInset.top + } else { + return scrollView.contentOffset.y + UIScreen.main.bounds.height + 15 > scrollView.contentSize.height + } } func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { @@ -263,7 +265,6 @@ class InteractiveDismissCoordinator: NSObject, ObservableObject, UIGestureRecogn otherGestureRecognizer.isEnabled = false otherGestureRecognizer.isEnabled = true } - return true } From 3e07c2537306f5d20f7b303e9bfadd29fdc96ace Mon Sep 17 00:00:00 2001 From: Brody Roberts Date: Mon, 1 Dec 2025 10:00:56 -0800 Subject: [PATCH 2/4] Removed Comment --- Sources/FlowStack/View+InteractiveDismiss.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/FlowStack/View+InteractiveDismiss.swift b/Sources/FlowStack/View+InteractiveDismiss.swift index 8219f49..581ee8f 100644 --- a/Sources/FlowStack/View+InteractiveDismiss.swift +++ b/Sources/FlowStack/View+InteractiveDismiss.swift @@ -214,7 +214,6 @@ class InteractiveDismissCoordinator: NSObject, ObservableObject, UIGestureRecogn private func update(offset: CGPoint, isEdge: Bool, hasEnded: Bool) { isUpdating = true onPan(offset) - print("🦦 offset.y \(offset.y). threshold \(threshold)") let shouldDismiss = abs(offset.y) > threshold || (offset.x > threshold && isEdge) if shouldDismiss != isPastThreshold && shouldDismiss { impactGenerator.impactOccurred() From f99b979827c2759695fdb7197ba613d08d6d75cf Mon Sep 17 00:00:00 2001 From: Brody Roberts Date: Mon, 1 Dec 2025 10:40:14 -0800 Subject: [PATCH 3/4] Added buffer for dismiss --- Sources/FlowStack/View+InteractiveDismiss.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/FlowStack/View+InteractiveDismiss.swift b/Sources/FlowStack/View+InteractiveDismiss.swift index 581ee8f..f13a9e0 100644 --- a/Sources/FlowStack/View+InteractiveDismiss.swift +++ b/Sources/FlowStack/View+InteractiveDismiss.swift @@ -214,7 +214,7 @@ class InteractiveDismissCoordinator: NSObject, ObservableObject, UIGestureRecogn private func update(offset: CGPoint, isEdge: Bool, hasEnded: Bool) { isUpdating = true onPan(offset) - let shouldDismiss = abs(offset.y) > threshold || (offset.x > threshold && isEdge) + let shouldDismiss = offset.y > threshold || (offset.x > threshold && isEdge) || -offset.y > threshold * 2 if shouldDismiss != isPastThreshold && shouldDismiss { impactGenerator.impactOccurred() } @@ -239,7 +239,7 @@ class InteractiveDismissCoordinator: NSObject, ObservableObject, UIGestureRecogn if panGestureRecognizer.translation(in: scrollView).y > 0 { return scrollView.contentOffset.y - 5 <= -scrollView.contentInset.top } else { - return scrollView.contentOffset.y + UIScreen.main.bounds.height + 15 > scrollView.contentSize.height + return scrollView.contentOffset.y + UIScreen.main.bounds.height > scrollView.contentSize.height + 20 } } From 19beb94b45cac431bc7fb5ea0687d1eb264ee903 Mon Sep 17 00:00:00 2001 From: Brody Roberts Date: Thu, 4 Dec 2025 16:20:01 -0800 Subject: [PATCH 4/4] added parameter --- Sources/FlowStack/FlowLink.swift | 9 +++++++-- Sources/FlowStack/FlowPath.swift | 2 ++ Sources/FlowStack/FlowTransition.swift | 2 +- .../FlowStack/View+InteractiveDismiss.swift | 20 +++++++++++++------ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Sources/FlowStack/FlowLink.swift b/Sources/FlowStack/FlowLink.swift index cf41396..24ee4dc 100644 --- a/Sources/FlowStack/FlowLink.swift +++ b/Sources/FlowStack/FlowLink.swift @@ -217,7 +217,8 @@ public struct FlowLink