Am I missing something, or does SwiftUI have no way to detect whether a view needs a dismiss button?
i.e. just tell me if there is a system back button shown
Am I missing something, or does SwiftUI have no way to detect whether a view needs a dismiss button?
i.e. just tell me if there is a system back button shown
@harshil AFAIK, it’s only automatic when presenting a UINavigationController. Otherwise, gesture dismissal is “enough” for sheets. Full screen cover? Provide the button yourself via toolbar.
Take this with a bag of salt. It’s my current understanding with no research.
@harshil Hmm. Maybe inject a “needsDismissal” Bool into the environment from higher up? Maybe-dismissive-aware hosts can check its presence?
Edit: there may be a more elegant way to achieve that, but I’m struggling to think of how.