title: SwiftUI Dismiss Multiple Modal Sheets
body: <p>I am using <code>.sheet(isPresented: self.$showModal)</code> in my root view to present a modal. Within the modal, I am using <code>NavigationView</code> to take the user through various pages (for a user profile builder). </p>
  
  <p>In the last page of my navigation stack, I am using  <code>@Environment(\.presentationMode) var presentationMode</code> and a button which calls <code>self.presentationMode.wrappedValue.dismiss()</code> to dismiss the modal. However, this only dismisses the last page in the navigation stack, and I just end up at the previous page. What I want to do is dismiss the entire navigation stack and end up back at the root view.</p>
  
  <p>Swiping down to dismiss the modal produces the desired result, but I want to do this programatically with the button.</p>
  
  <p>Is this currently possible in SwiftUI, or is this a problem with using <code>NavigationView</code> within a modal sheet?</p>