Stack Overflow post: https://stackoverflow.com/questions/62722308/swiftui-sheet-automatically-dismisses-itself
Code Block class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { if let windowScene = scene as? UIWindowScene { let window = UIWindow(windowScene: windowScene) window.rootViewController = UIHostingController(rootView: NavigationView{ List{ ForEach(0..<10){ value in Text("Hello, World \(value)") } } NavigationLink(destination: Test()) { Text("Details") } } ) self.window = window window.makeKeyAndVisible() } } } struct Test : View{ @State var show = false var body : some View{ Text("Details") .sheet(isPresented: $show, content: { Color.blue }) .toolbar{ ToolbarItem(placement: .navigationBarTrailing) { Button("Show Sheet"){ show.toggle() } } } } }