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

    flutter – firebase_messaging onMessage stream never fires after UIScene migration on iOS

    April 15, 2026

    Grief and the Nonprofessional Programmer – O’Reilly

    April 15, 2026

    AI data center startup Fluidstack in talks for $1B round at $18B valuation months after hitting $7.5B, says report

    April 15, 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, 2026022 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

    flutter – firebase_messaging onMessage stream never fires after UIScene migration on iOS

    April 15, 2026

    swift – Flutter iOS: USSD code with * and # not launching in phone dialer (works on Android)

    April 14, 2026

    Firebase App Check debug token returns 403 “App attestation failed” on iOS Flutter app — misleading error hides API key restriction

    April 13, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    flutter – firebase_messaging onMessage stream never fires after UIScene migration on iOS

    April 15, 2026

    Grief and the Nonprofessional Programmer – O’Reilly

    April 15, 2026

    AI data center startup Fluidstack in talks for $1B round at $18B valuation months after hitting $7.5B, says report

    April 15, 2026

    Microsoft adds Windows protections for malicious Remote Desktop files

    April 15, 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!

    flutter – firebase_messaging onMessage stream never fires after UIScene migration on iOS

    April 15, 2026

    Grief and the Nonprofessional Programmer – O’Reilly

    April 15, 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.