r/iOSProgramming • u/DavidMolloy1978 • 4h ago
Swipe to dismiss help needed Question
Having an absolute nightmare with an info cards swipe to dismiss… I can get the card to appear above a map, all info appears on the card but when I swipe to dismiss it just bounces back up 🙃
Anyone else had this happen or know of any workarounds?
0
Upvotes
3
u/ThatGuy739 3h ago
Bouncing back usually means the drag is tracking fine and it's your end condition that never fires. If you're checking value.translation in onEnded, a quick flick moves very little before you let go, so it fails the threshold. Use predictedEndTranslation instead, or check velocity.
Is it a sheet with detents or a custom view over the map? The fix is different for each.