spacenation / swiftui-sliders

:rocket: SwiftUI Sliders with custom styles
MIT License
805 stars 85 forks source link

Specifying a custom range #13

Closed ramluro1 closed 4 years ago

ramluro1 commented 4 years ago

I would like to use a range slider to select an Age range within the 18 years old - 80 years old. How do I define a custom range for the sliders?

ramluro1 commented 4 years ago

I figured it out: @State private var ageRange = 13.0...80.0 ...

RangeSlider(range: $ageRange, in: 13...80)