SPM support
Custom range slider in SwiftUI
In Xcode, use the menu File > Swift Packages > Add Package Dependency… and enter the package URL https://github.com/Rahul-Mayani/RRRangeSliderSwiftUI.
https://github.com/Rahul-Mayani/RRRangeSliderSwiftUI
RRRangeSliderSwiftUI.swift
To run the example project, clone the repo, and run pod install from the Example directory first.
@State var minValue: Float = 0.0 @State var maxValue: Float = Float(UIScreen.main.bounds.width - 50.0) var body: some View { VStack { Text("Range Slider") /// slider view RRRangeSlider( minValue: self.$minValue, // mimimum value maxValue: self.$maxValue, // maximum value sliderWidth: CGFloat(maxValue), // set slider width backgroundTrackColor: Color(UIColor.systemTeal).opacity(0.5), // track color selectedTrackColor: Color.blue.opacity(25), // track color globeColor: Color.orange, // globe background color globeBackgroundColor: Color.black, // globe rounded border color globeMinMaxValuesColor: Color.black // all text label color ) } }
We would love you for the contribution to RRRangeSliderSwiftUI, check the LICENSE file for more info.
LICENSE
RRRangeSliderSwiftUI is available under the MIT license. See the LICENSE file for more info.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
RRRangeSliderSwiftUI
Custom range slider in SwiftUI
Installation
SPM (Swift Package Manager)
In Xcode, use the menu File > Swift Packages > Add Package Dependency… and enter the package URL
https://github.com/Rahul-Mayani/RRRangeSliderSwiftUI
.Manually
RRRangeSliderSwiftUI.swift
file for slider viewUsage example
To run the example project, clone the repo, and run pod install from the Example directory first.
Contribute
We would love you for the contribution to RRRangeSliderSwiftUI, check the
LICENSE
file for more info.License
RRRangeSliderSwiftUI is available under the MIT license. See the LICENSE file for more info.