Home > AI > IOS > SwiftUI >

Slider

Example:

struct ContentView: View {
    @State private var sliderValue: Double = 0
    private let maxValue: Double = 10
    
    var body: some View {
        
        Slider(value: $sliderValue,
                   in: 0...maxValue)
                .padding(30)
    }
}

Leave a Reply