Latest 0.1.0
Homepage https://github.com/3ph/SplitSlider
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform
Swift

Customizable two way slider split in the middle. Left and right parts are independent, each can have different min,
max, step, colors, etc.

Screenshot

Usage

Simply add as custom view to storyboard or create programatically.

let slider = SplitSlider()

Generic slider properties (affects both parts):

slider.min – minimal slider value.
slider.max – maximal slider value.
slider.step – step value of the slider.
slider.labelFont – font of the value labels.
slider.labelTextColor – font color of the value labels.
slider.thumbSize – size of the slider’s thumb.
slider.thumbColor – color of the thumb.
slider.trackHeight – track height.
slider.trackColor – track color.
slider.trackHighlightColor – color of selected part of the track.
slider.snapToStep – determines if thumb should be snapped to the closest step after the move.

All above properties would affect both portions of the slider but can be set individually through either slider.left or slider.right portion.

Delegate methods

slider(_ slider: SplitSlider, didSelect portion: SplitSliderPortion?) – called when user selects (holds) portion of the slider. Return nil when no portion is being hold.

slider(_ slider: SplitSlider, didUpdate value: CGFloat, for portion: SplitSliderPortion) – called when user drags the thumb and portion value is thus updated.

Example

To run the example project, run pod try.

Requirements

iOS 8+.

Installation

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

pod "SplitSlider"

Author

Tomas Friml, [email protected]

License

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

Latest podspec

{
    "name": "SplitSlider",
    "version": "0.1.0",
    "summary": "A simple customizable two way slider.",
    "description": "Two way slider with zero (minimum) in the middle. In fact two sliders combined into one,nleft one increasing towards left, right one towards right.nThe appearance is customizable as well as the individual slider portions.",
    "homepage": "https://github.com/3ph/SplitSlider",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "3ph": "[email protected]"
    },
    "source": {
        "git": "https://github.com/3ph/SplitSlider.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SplitSlider/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This