Latest 1.0.5
Homepage https://github.com/simformsolutions/SSCircularSlider
License MIT
Platforms ios 10.0
Authors

A simple and powerful circular ring slider, written in swift and fully customizable.

Swift Version
Build Status
License
Platform
PRs Welcome

Alt text

Features!

  • Circular ring slider
  • Customizable slider color
  • Costmize slider knob
  • Customizable sider end point buttons
  • Adjust slider by editing center label
  • Dynammic values of slider
  • CocoaPods

Requirements

  • iOS 10.0+
  • Xcode 9+

Installation

CocoaPods

  • You can use CocoaPods to install SSSpinnerButton by adding it to your Podfile:

    use_frameworks!
    pod ‘SSCircularSlider’

  • import UIKit
    import SSCircularSlider

Manually

  • Download and drop SSCircularSlider folder in your project.
  • Congratulations you are done with installation!

Usage example

  • In the storyboard add a UIView and change its class to SSCircularSlider
    Alt text

    SetValues

    let arrValues: [Int] = [Int](0...30)
    circularRingSlider.setArrayValues(labelValues: arrValues, currentIndex: indexOfValue)

    SetInitialValue

    let arrValues: [Int] = [Int](0...30)
    indexOfValue = 0
    circularRingSlider.setValues(initialValue: arrValues[indexOfValue].toCGFloat(), minValue: arrValues[0].toCGFloat(), maxValue: arrValues[arrValues.count-1].toCGFloat())

    SetKnobImage

    circularRingSlider.setKnobOfSlider(knobSize: 40, knonbImage: UIImage(named: "iconKnobRed")!)

    SetTextFieldDelegate

    circularRingSlider.setValueTextFieldDelegate(viewController: self)

    SetRingWidth

    circularRingSlider.setCircularRingWidth(innerRingWidth: 18, outerRingWidth: 18)

    SetBackgroundColorOfAllButtons

    circularRingSlider.setBackgroundColorOfAllButtons(startPointColor: UIColor.red, endPointColor: UIColor.lightGray, knobColor: UIColor.white)

    SetEndPointImages

    circularRingSlider.setEndPointsImage(startPointImage: iconMinus, endPointImage: iconPlus)

    SetProgressLayerColor(Gradient Colors)

    circularRingSlider.setProgressLayerColor(colors: [UIColor.red.cgColor, UIColor.red.cgColor])

    SetCircularSliderDelegate

    extension ViewController: SSCircularRingSliderDelegate {
        func controlValueUpdated(value: Int) {
            print("current control value:(value)")
            // Your code here
        }
    }

Contribute

  • We would love you for the contribution to SSCircularSlider, check the LICENSE file for more info.

Meta

  • Distributed under the MIT license. See LICENSE for more information.

Latest podspec

{
    "name": "SSCircularSlider",
    "version": "1.0.5",
    "summary": "A simple, powerful and fully customizable circular ring slider, written in swift.",
    "homepage": "https://github.com/simformsolutions/SSCircularSlider",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ketan Chopda": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/simformsolutions/SSCircularSlider.git",
        "tag": "1.0.5"
    },
    "source_files": "SSCircularSlider/SSCircularRingSlider/**/*.{h,m,swift}",
    "resources": [
        "SSCircularSlider/SSCircularRingSlider/Media/Media.xcassets"
    ],
    "resource_bundles": {
        "SSCircularSlider": [
            "SSCircularSlider/SSCircularRingSlider/Media/Media.xcassets"
        ]
    },
    "documentation_url": "docs/index.html"
}

Pin It on Pinterest

Share This