Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/warchimede/RangeSlider
A simple range slider made in Swift
https://github.com/warchimede/RangeSlider
Last synced: about 1 month ago
JSON representation
A simple range slider made in Swift
- Host: GitHub
- URL: https://github.com/warchimede/RangeSlider
- Owner: warchimede
- License: mit
- Created: 2014-09-08T16:43:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-09-12T16:23:25.000Z (over 1 year ago)
- Last Synced: 2024-11-17T20:02:53.688Z (about 2 months ago)
- Language: Swift
- Homepage:
- Size: 101 KB
- Stars: 367
- Watchers: 10
- Forks: 78
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - RangeSlider - A simple range slider made in Swift (UI / Slider)
- awesome-ios-star - RangeSlider - A simple range slider made in Swift (UI / Slider)
- awesome - RangeSlider - A simple range slider made in Swift. (OOM-Leaks-Crash / Slider)
README
# RangeSlider
[![License](https://img.shields.io/cocoapods/l/WARangeSlider.svg?style=flat)](http://cocoapods.org/pods/WARangeSlider)
[![Platform](https://img.shields.io/cocoapods/p/WARangeSlider.svg?style=flat)](http://cocoapods.org/pods/WARangeSlider)
[![Version](https://img.shields.io/cocoapods/v/WARangeSlider.svg?style=flat)](http://cocoapods.org/pods/WARangeSlider)## Summary
A simple range slider made in Swift.
## Screenshot
![](https://github.com/warchimede/RangeSlider/blob/master/Screenshot.png?raw=true)
## Use
This control is **IBDesignable** and uses the **target-action** pattern for change notifications.
In order to be notified when either thumb value changes, register for **.valueChanged**:
```swift
let rangeSlider = RangeSlider(frame: frame)
view.addSubView(rangeSlider)
rangeSlider.addTarget(self, action: #selector(viewController.rangeSliderValueChanged(_:)), for: .valueChanged)
```## Configuration
The range slider can be customized and information can be accessed through these properties :
- `minimumValue` : The minimum possible value of the range
- `maximumValue` : The maximum possible value of the range
- `lowerValue` : The value corresponding to the left thumb current position
- `upperValue` : The value corresponding to the right thumb current position
- `trackTintColor` : The track color
- `trackHighlightTintColor` : The color of the section of the track located between the two thumbs
- `thumbTintColor`: The thumb color
- `thumbBorderColor`: The thumb border color
- `thumbBorderWidth`: The width of the thumb border
- `curvaceousness` : From 0.0 for square thumbs to 1.0 for circle thumbs## Installation
RangeSlider is available through Swift Package Manager and [CocoaPods](http://cocoapods.org).
### Cocoapods
To install it, simply add the following line to your Podfile :
```ruby
pod "WARangeSlider"
```## Author
[William Archimede](https://github.com/warchimede)
## License
RangeSlider is available under the MIT License