edudnyk / SheeKit

Customize and resize sheets in SwiftUI with SheeKit. Utilise the power of `UISheetPresentationController` and other UIKit features.
MIT License
91 stars 7 forks source link

Question: Possible to interact with View behind Sheet? (e.g. Google Maps experience) #14

Closed samskinner32 closed 1 year ago

samskinner32 commented 1 year ago

EDIT: Nevermind, I think largestUndimmedDetentIdentifier lets us achieve this :)

Hi @edudnyk , thanks for this package, it's awesome.

We have a use case that I was curious if can be achieved with SheeKit. Similar to interactions found in Google Maps, We have a map with various pins and when the user presses a pin, we are showing a bottom sheet with information about that location.

Currently, when the user presses anywhere above the sheet (in the dark overlay), it dismisses the sheet - as you'd expect. However, what we want to achieve is that the user can actually press on another pin on the map while the sheet is up and capture that press to switch the sheet out without needing to first tap once to dismiss, tap again to open a new one. And even better if the user could pan around that map with the sheet still up. Hopefully that makes sense?

Is that something we can achieve with SheeKit or is there no way to bypass the "tap outside sheet to dismiss only" functionality. My assumption is we'll need to build a custom solution not using sheets, but I wanted to check!

Thank you!!