Latest 0.6
Homepage https://github.com/maximbilan/SwiftlySlider
License MIT
Platforms ios 8.0, requires ARC
Authors

Simple iOS slider control.

alt tag

Installation

CocoaPods:

Swift 3.0:
pod 'SwiftlySlider', '0.5'

Swift 4.0:
pod 'SwiftlySlider', '~> 0.6'

Manual:

Just copy the SwiftlySlider.swift into your project.

Using

You can create from Storyboard or XIB. Or create manually:

let slider = SwiftlySlider()

For handling changing of values you should implement protocol SwiftlySliderDelegate:

slider.delegate = self

func swiftlySliderValueChanged(value: Int) {
}

Direction:

picker.direction = SwiftlySlider.PickerDirection.Horizontal // Vertical, Horizontal

Also you can change current value, maximum value or minimum value, for example:

picker.currentValue = 0
picker.maxValue     = 30
picker.minValue     = 1

Slider settings:

sliderImage       // Custom image of the slider
sliderImageOffset // Offset of custom slider position
sliderSize        // Size of custom slider position

Example:

slider.sliderImage = UIImage(named: "CustomSlider")
slider.sliderImageOffset = CGPoint(x: 0, y: -1)
slider.sliderSize = CGSize(width: 30, height: 15)

Normal indicator:

useNormalIndicator  // Use normal indicator
normalValue         // Normal value

Color settings:

labelFontColor        // Font color of the moving label
labelBackgroundColor  // Background color of the moving label
labelFont             // Font of the moving label
bgColor               // Background color

You can easily found example in this repository.

License

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

Latest podspec

{
    "name": "SwiftlySlider",
    "version": "0.6",
    "summary": "SwiftlySlider",
    "description": "SwiftlySlider - a custom slider control",
    "homepage": "https://github.com/maximbilan/SwiftlySlider",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Maxim Bilan": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/maximbilan/SwiftlySlider.git",
        "tag": "0.6"
    },
    "source_files": [
        "Classes",
        "SwiftlySlider/Sources/**/*.{swift}"
    ],
    "requires_arc": true,
    "pushed_with_swift_version": "4"
}

Pin It on Pinterest

Share This