.preferredColorScheme doesn't work with .scrollEdgeEffectStyle(.hard, for: .top)

.preferredColorScheme(.dark) doesn't seem to affect app toolbar, when .scrollEdgeEffectStyle(.hard, for: .top) is used. In the attachment, you can see the title and toolbar items don't change according to current value of .preferredColorScheme (you may need to scroll a bit to achieve it)

  • iOS 26 RC
  • Feedback ID - FB19769073
import SwiftUI

struct ContentView: View {
    var body: some View {
        NavigationStack {
            ScrollView(.vertical) {
                ForEach(0..<100) { index in
                    Text("\(index)")
                        .padding()
                        .border(.blue)
                        .background(.blue)
                        .frame(maxWidth: .infinity)
                }
            }
            .scrollEdgeEffectStyle(.hard, for: .top)
            .navigationTitle("Test Title")
            .navigationBarTitleDisplayMode(.inline)
            .toolbar {
                ToolbarItem(placement: .navigationBarTrailing) {
                    Button(action: {
                    }) {
                        Text("Test")
                    }
                }
            }
        }
        .preferredColorScheme(.dark)
    }
}

#Preview {
    ContentView()
}

.preferredColorScheme doesn't work with .scrollEdgeEffectStyle(.hard, for: .top)
 
 
Q