Post

Replies

Boosts

Views

Activity

Collapsing NavigationStack When NavigationSplitView is Backgrounded on iPadOS 17.x
I'm pursuing a design that necessitates a dual app architecture — using a NavigationStack for compact-sized screens, and a NavigationSplitView for regular-sized screens. I've encountered what might be a bug in NavigationSplitView on iPadOS 17.x. Or perhaps it's a mistake in my code. When navigating into nested views (relying on NavigationPath), everything works fine... until I background the app on iPad. At this point, the navigation stack appears to collapse in the NavigationSplitView detail area — merging the parent and child views. Adding to the mystery... I can reproduce this bug on iPadOS 17.x. But the problem goes away when running on iPadOS 18.x beta. Key questions: Is there a problem in my code? Should I file a feedback with the Apple SwiftUI team? If iPadOS 18.x fixes this bug, can I expect a SwiftUI fix to be back-ported to 17.x or earlier? Steps to reproduce: Run my sample code on iPadOS simulator. Navigate to select a color, and then a shape. Put the app into the background (e.g., go to Home Screen). Return to app. What you can expect: When running on iPadOS 17.x, you'll see that the two most recent views in the stack have merged (meaning the title has changed, and the "back" button has disappeared). On iPadOS 18.x, you'll see that everything is working fine (title isn't changed, and back button remains available).
5
0
603
Jul ’24