Has anyone found a workaround or solution? I'm seeing this behavior in Xcode 26.6 (17F113) and MacOS 26.5.2., even with Apple's own example code.
import SwiftUI
struct SliderViewTest: View {
@State private var speed = 50.0
@State private var isEditing = false
var body: some View {
VStack {
Slider(
value: $speed,
in: 0...100,
step: 5
) {
Text("Speed")
} minimumValueLabel: {
Text("0")
} maximumValueLabel: {
Text("100")
} onEditingChanged: { editing in
isEditing = editing
}
Text("\(speed)")
.foregroundColor(isEditing ? .red : .blue)
}
}
}
#Preview {
SliderViewTest()
.padding()
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: