A Range Slider Control for iOS.
To run the example project, clone the repo, and run pod install
from the Example directory first.
YCRangeSlider is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'YCRangeSlider', '0.1.0'
(see sample Xcode project in /Example)
let slider = YCRangeSlider
// Setup the Values
slider.minimumValue = 0
slider.selectedMinimumValue = 0
slider.maximumValue = 500
slider.selectedMaximumValue = 500
slider.minimumRange = 1
// Configure custom interface
slider.barBackground = UIImage(named: "tm_bar-background")
slider.minHandle = UIImage(named: "tm_handle_start")
slider.maxHandle = UIImage(named: "tm_handle_end")
slider.popViewBackgroundImage = UIImage(named: "time-machine_popValue_bg")
let height: CGFloat = 463
let width: CGFloat = 133
slider.initWithFrame2(frame: CGRectMake((self.view.frame.width-width)/2, (self.view.frame.height - height)/2, width, height))
self.view.addSubview(slider)
Yang Cun, [email protected]
YCRangeSlider is available under the MIT license. See the LICENSE file for more info.