Tapping tab icon causes incorrect navigation title layout in SwiftUI on iOS 18

Hello,

I'm so glad that now you can scroll the list to top by tapping the tab bar ion on iOS 18. However, the current implementation on iOS 18 beta 8 has a little layout issue.

import SwiftUI

struct ContentView: View {
    var body: some View {
        TabView {
            Tab("Home", systemImage: "house") {
                NavigationStack {
                    List {
                        ForEach(0..<100) { i in
                            Text("\(i)")
                        }
                    }
                    .navigationTitle("Root")
                }
            }
        }
    }
}

#Preview {
    ContentView()
}

Tap the tab icon:

Result:

Hi @Gong ,

This looks like a bug to me! Please file a bug report at https://feedbackassistant.apple.com and paste the FB number here. You'll be able to follow along with the resolution on the feedback assistant site. Include that small project with it.

FB15038185

Tapping tab icon causes incorrect navigation title layout in SwiftUI on iOS 18
 
 
Q