SlideOverCard icon indicating copy to clipboard operation
SlideOverCard copied to clipboard

Close on Tap Outside

Open Mcrich23 opened this issue 3 years ago • 1 comments

Is there a way you can make it, so a tap outside of the card dismisses it. Thanks!

Mcrich23 avatar Feb 15 '22 04:02 Mcrich23

Seems to me like this could be implemented into here, as well as further down in the code: https://github.com/joogps/SlideOverCard/blob/791197c26a0fea83fcf31b1e9fb9a324db7a4b0b/Sources/SlideOverCard/SlideOverCard.swift#L24 Using struct TouchGesture from SwiftUI, detect when a tap gesture that's outside the card's view and close it from there. Looking into SlideOverCard.swift's logic, it appears that there's logic already in place to detect dragging so shouldn't be too hard!

I can start work on this @joogps if you're okay with that 🙂

corbin-r avatar Apr 08 '22 06:04 corbin-r

@Mcrich23 @corbin-r thank you for your support!

joogps avatar Mar 20 '24 23:03 joogps