I have a NavigationStack
that contains a ScrollView
at the bottom of the screen.
struct ContentView: View {
var body: some View {
NavigationStack {
VStack {
Text("Some Content")
Spacer()
ScrollView {
VStack {
ForEach(0..<20) { _ in
Text("Some text")
.containerRelativeFrame(.horizontal)
}
}
}
.frame(height: 200)
}
.navigationTitle("Foo")
}
}
}
In iOS 18, this works as expected. In iOS 26 beta 1 however, the navigation title "Foo" is invisible, until I scroll down. This doesn't make sense. A scroll view at the bottom of the screen can somehow affect the navigation title. They are as far apart as they can be!
I thought this is one of the "scroll edge effects" introduced in iOS 26, but the navigation title is still invisible after putting .scrollEdgeEffectDisabled()
on the scroll view.
How can I make the navigation title visible?
The way the navigation title becomes visible during scrolling suggests that only the large title is "broken" - SwiftUI is still able to display an inline title.
Adding
.navigationBarTitleDisplayMode(.inline)
to the VStack
makes the navigation title visible. Of course, the side effect of this is that it removes the large navigation title, which could be undesirable.