CustomModalView icon indicating copy to clipboard operation
CustomModalView copied to clipboard

Disabling background view?

Open crspybits opened this issue 5 years ago • 1 comments

Hi-- Thanks for this package!! I'm using it in https://github.com/SyncServerII/Neebla. One thing I'm finding: So far, in my use of your package, by default-- the background view controls are not disabled. I'm having to take some additional separate steps to disable them. For example, in a nav bar, when a modal is presented, I can still tap on the nav bar buttons on the background view. What I'd like (at least as option) is to be able to automatically disable all controls on the screen beneath the modal.

I'm still pretty new to SwiftUI so not sure how this change would go. But could take a stab at a PR if this sounds interesting. Thoughts?

crspybits avatar Nov 26 '20 18:11 crspybits

Hi Chris! This is a very good insight :). The problem is that the navigation controls like NavigationView and TabView are laid over the view that is presenting the modal. As they're on top of the view, they remain visible and active...

Unfortunately I don't think that there's a reasonable way of solving this. You basically either need to display the modal above everything (e.g. somewhere in the ContentView) or hook into UIKit :(.

jankaltoun avatar Nov 27 '20 11:11 jankaltoun