On iPad, when I have a navigation hierarchy presented in a similar style to the following:
NavigationView {
NavigationLink(destination: Text("Hi").actionSheet(isPresented: .constant(true)) { () -> ActionSheet in
ActionSheet(title: Text("welllllll"))
},
tag: true,
selection: $didNavigateToChild) {
Button(action: {
self.didNavigateToChild = true
}) {
Text("Let's go!")
}
}
}
.navigationViewStyle(StackNavigationViewStyle())
By the time the popover, actionsheet, or sheet are presented (in this case, the ActionSheet with text "welllllll") the child view is dismissed (Text("Hi")) and I end up back at Text("Let's go!").
I've been trying to catch what's calling this dismissal, but I'm new to SwiftUI and my old symbolic breakpoints are failing me.
For whatever reason, this only occurs on iPad. Presenting ActionSheet and Sheet from child NavigationViews works just fine on iPhone without any weird navigation side effects.