Close Menu
  • Home
  • AI
  • Big Data
  • Cloud Computing
  • iOS Development
  • IoT
  • IT/ Cybersecurity
  • Tech
    • Nanotechnology
    • Green Technology
    • Apple
    • Software Development
    • Software Engineering

Subscribe to Updates

Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

    What's Hot

    Posit AI Blog: torch for optimization

    February 26, 2026

    swift – SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26)

    February 26, 2026

    Turn Security Into Serious Margin: Why Every CSP Should Build Security Services with vDefend ATP

    February 26, 2026
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Big Tee Tech Hub
    • Home
    • AI
    • Big Data
    • Cloud Computing
    • iOS Development
    • IoT
    • IT/ Cybersecurity
    • Tech
      • Nanotechnology
      • Green Technology
      • Apple
      • Software Development
      • Software Engineering
    Big Tee Tech Hub
    Home»iOS Development»swift – SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26)
    iOS Development

    swift – SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26)

    big tee tech hubBy big tee tech hubFebruary 26, 2026002 Mins Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
    Follow Us
    Google News Flipboard
    swift – SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26)
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    I’m experiencing an issue on iOS 26.4 where nested .sheet presentations are automatically dismissed when the app goes to the background. I was able to reproduce similar case on iOS 26.2 but can’t build a minimal reproducible project out of the real one.

    Minimal reproducible example

    struct ContentView: View {
        var body: some View {
            TabView {
                firstTabContent()
                    .tabItem {
                        Text("First tab")
                    }
            }
        }
    
        private func firstTabContent() -> some View {
            NavigationStack {
                RootScreenView()
                    .navigationDestination(for: String.self) { string in
                        Text(string)
                    }
            }
        }
    }
    
    struct RootScreenView: View {
        @State private var isSheetPresented: Bool = false
    
        var body: some View {
            VStack {
                Text("Root screen view")
                Button("Show sheet") {
                    isSheetPresented = true
                }
            }
            .sheet(isPresented: $isSheetPresented) {
                StubScreenView(level: 1)
            }
        }
    }
    
    struct StubScreenView: View {
        let level: Int
        @State private var isSheetPresented: Bool = false
    
        var body: some View {
            VStack {
                Text("Level \(level)")
                Button("Show sheet") {
                    isSheetPresented = true
                }
            }
            .sheet(isPresented: $isSheetPresented) {
                StubScreenView(level: level + 1)
            }
        }
    }
    

    Steps to reproduce

    1. Launch the app

    2. Tap “Show sheet” → level 1 sheet appears

    3. Tap “Show sheet” again → level 2 sheet appears

    4. Minimize the app (home screen or app switcher)

    5. Return to the app

    After returning to the app all sheets except the first one are collapsed without any animation.

    What I’ve found

    The issue requires the specific combination of TabView + NavigationStack + .navigationDestination. Any of the following changes prevent the issue:

    • Removing .navigationDestination(for:) from the NavigationStack

    • Removing the TabView wrapper

    • Moving .navigationDestination before .sheet in the modifier chain on RootScreenView

    This suggests the issue is related to how iOS 26.4 manages the UIKit presentation controller hierarchy during the background transition when these three elements interact. However, it’s quite common case if app uses modern SwiftUI navigation.

    Environment

    iOS 26.4
    Xcode 26.2 and 26.4
    Reproducible on both Simulator and physical device

    Has anyone else encountered this or found a more robust workaround?



    Source link

    .navigationDestination app background dismissed iOS NavigationStack Nested Sheets Swift SwiftUI TabView
    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    tonirufai
    big tee tech hub
    • Website

    Related Posts

    swift – How to get iOS LiveActivity to change status to timer completed

    February 25, 2026

    reactjs – Telegram Mini App (iOS) + Vaul Drawer: Virtual keyboard hides input or pushes drawer off-screen

    February 24, 2026

    Keeping Google Play & Android app ecosystems safe in 2025

    February 23, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    Posit AI Blog: torch for optimization

    February 26, 2026

    swift – SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26)

    February 26, 2026

    Turn Security Into Serious Margin: Why Every CSP Should Build Security Services with vDefend ATP

    February 26, 2026

    Tim Cook sums up Steve Jobs in just four words

    February 26, 2026
    About Us
    About Us

    Welcome To big tee tech hub. Big tee tech hub is a Professional seo tools Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of seo tools, with a focus on dependability and tools. We’re working to turn our passion for seo tools into a booming online website. We hope you enjoy our seo tools as much as we enjoy offering them to you.

    Don't Miss!

    Posit AI Blog: torch for optimization

    February 26, 2026

    swift – SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26)

    February 26, 2026

    Subscribe to Updates

    Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

      • About Us
      • Contact Us
      • Disclaimer
      • Privacy Policy
      • Terms and Conditions
      © 2026 bigteetechhub.All Right Reserved

      Type above and press Enter to search. Press Esc to cancel.