Skip to content

backslash112/YCRangeSlider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YCRangeSlider

CI Status Version License Platform

A Range Slider Control for iOS.

Screenshot

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

YCRangeSlider is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YCRangeSlider', '0.1.0'

Usage

(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)

Author

Yang Cun, yangcun@live.com

License

YCRangeSlider is available under the MIT license. See the LICENSE file for more info.