With iOS 18.0, this snippet of code that has a NavigationSplitView
inside a NavigationStack
will not display the sidebar until the navigation transition is completed.
NavigationStack {
NavigationLink("Link") {
NavigationSplitView {
Text("Example")
} detail: {
Text("Does not appear")
}
}
}
Directly after pressing the link, a toolbar briefly appears. Once the transition is completed, the split view's sidebar appears and the toolbar disappears. The detail view does not visually appear at all.
The same problem occurs when using .navigationDestination(…)
, which I am in our production code.
I've tested this in Xcode 16.0 Previews for iOS 18.0, iPhone SE Simulator iOS 18.0, iPadOS 18.0 when horizontal size class is compact, and on my personal iPhone 13 mini iOS 18.0 I experienced this problem on our production app.
Is there any workaround to not have this delay? Our app is heavily built around this nested approach, and has been working perfectly in previous iOS versions.