How to remove the line under a SwiftUI Slider?

1 week ago 7
ARTICLE AD BOX

I use a Slider in SwiftUI:

import SwiftUI struct TestSliderView: View { @State var minExpDuration: Double let minExpDurationRange: ClosedRange<Double> = 200...3000 var body: some View { minExpDurationSlider } private var minExpDurationSlider: some View { Slider( value: $minExpDuration, in: minExpDurationRange, step: 10, onEditingChanged: { changed in }, minimumValueLabel: Text(""), maximumValueLabel: Text(""), label: { Text("") } ) .scrollIndicators(.hidden) .accentColor(.white) .frame(width: 150.0, height: 30) } }

But it contains an unnecessary line in iOS SDK 26 (Xcode 26.1). How can I remove this line?

How to remove the line under the Slider?

Read Entire Article