In SwiftUI sliders now have tick marks by default on iOS26, how do you turn them off or hide them? This WWDC talk had some sample code on how to set the tick marks but it doesn't compile for me: https://developer.apple.com/videos/play/wwdc2025/323/
I don't see any available methods or initializers to turn them off.
Looks like the ticks parameter is now exposed in beta4. An example from the Apple headers:
@State private var percentage = 0.5
Slider(value: $percentage) {
Text("Percentage")
} currentValueLabel: {
Text("\(percentage)%")
} ticks: {
SliderTickContentForEach(
stride(from: 0.0, through: 1.0, by: 0.25).map { $0 },
id: \.self
) { value in
SliderTick(value) {
label(for: value)
}
}
}