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

    Canvas Breach Disrupts Schools & Colleges Nationwide – Krebs on Security

    May 9, 2026

    Self-adhesive high-entropy oxide sub-nanowire monolithic electrocatalysts

    May 9, 2026

    Azure IaaS: Defense in depth built on secure-by-design principles

    May 9, 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

    Look What JavaScriptCore Has Been Doing in My Pocket

    May 9, 2026

    Cisco Networking App Marketplace Partners at Cisco Live 2026

    May 8, 2026

    iphone – How to retrieve the real physical screen DPI/PPI on iOS to draw a rectangle with an exact physical size?

    May 8, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    Canvas Breach Disrupts Schools & Colleges Nationwide – Krebs on Security

    May 9, 2026

    Self-adhesive high-entropy oxide sub-nanowire monolithic electrocatalysts

    May 9, 2026

    Azure IaaS: Defense in depth built on secure-by-design principles

    May 9, 2026

    Minimalist iPhone Home Screen layout: 3 tips to make yours great

    May 9, 2026
    Timer Code
    15 Second Timer for Articles
    20
    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!

    Canvas Breach Disrupts Schools & Colleges Nationwide – Krebs on Security

    May 9, 2026

    Self-adhesive high-entropy oxide sub-nanowire monolithic electrocatalysts

    May 9, 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.