Please find below a possible approach using custom back button (note: adding any leading navigation bar item disables default back button automatically)
Tested with Xcode 11.2 / iOS 13.2
struct DemoDetailsWithCustomBack: View { @Environment(\.presentationMode) var presentationMode @State private var allowsBack = true var body: some View { Text("Details here") .navigationBarItems( leading: Button(action: { if self.allowsBack { self.presentationMode.wrappedValue.dismiss() } else { // activate alert here } }, label: { Image(systemName: "chevron.left") }) ) } } struct TestNavBarButton_Previews: PreviewProvider { static var previews: some View { NavigationView { NavigationLink(destination: DemoDetailsWithCustomBack() ) { Text("Show Detail View") } } } }
navigationBarBackButtonHidden? And that's it: no back button - no back navigation.