Latest 0.2.0
Homepage https://github.com/KiranJasvanee/KJCurveSlider
License MIT
Platforms ios 9.0
Authors

Twitter: @KiranJasvanee
License: MIT
Issues
Forks
Stars
Language

Preview

Slide your progress through circular!

KJCircularSlider

Example

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

Requirements

  • Swift 3.0.1 or later
  • iOS 10.1 or later

CocoaPods

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

pod 'KJCircularSlider', '~> 0.2.0'

Usage

KJCircularSlider can be used via code or interface builder. You can add two or more KJCircularSlider’s in single view.

  • If configuring via code, use the traditional init methods and properties.

  • If using Interface Builder, add UIView on your interface builder, add KJCircularSlider in ‘Class’ & ‘Module’ properties of Identity inspector of added UIView.

Use following properties to edit design layout. Add your layout settings in viewDidAppear.

// declare instance of KJCircularSlider by connecting to UIView outlet at interface builder
@IBOutlet weak var circularSliderLarge: KJCircularSlider!
// use showPrecision boolean property to allow or not a precisions in percentage value.
circularSliderLarge.showPrecision = true

// use sliderWidth property value to apply width in circular
circularSliderLarge.sliderWidth = 2.0

// use sliderColor property value to apply color in circular
circularSliderLarge.sliderColor = UIColor.black

// use sliderSelectedAreaWidth property value to apply width in selected circular area
circularSliderLarge.sliderSelectedAreaWidth = 10.0

// use sliderSelectedAreaWidth property value to apply color in selected circular area
circularSliderLarge.sliderSelectedAreaColor = UIColor.orange

// use sliderCapColor property value to apply cap color
circularSliderLarge.sliderCapColor = UIColor.green

// use sliderCapColor boolean property value to weather fill or not a cap with cap color
circularSliderLarge.sliderCapFillColor = true

// use KJCircularDelegate, a delegate property to receive processed percentage value by using it's protocol method.
circularSliderLarge.KJCircularDelegate = self

Method

// use this protocol method to receive slider values
func getPercentage(circularSliderInstance: KJCircularSlider, percentValue: Float) {

        // use your declared instance for comparision, when you want use particular slider values at the time of two or more KJCircularSlider's available in single view.
        // access of specific small slider values
        if circularSliderInstance == circularSliderSmall {
            labelPercentForSmallerCircularSlider.text = "(percentValue)%"
        }
    }

Author

Kiran Jasvanee, [email protected], Skype: KiranJasvanee

License

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

Latest podspec

{
    "name": "KJCircularSlider",
    "version": "0.2.0",
    "summary": "Circular slider - to slide from 0 to 100 in circular shape",
    "description": "TODO: Add long description of the pod here.nIt's circular slider, It provides circular shape to slide around from 0 to 100 percent, You can use it when you required a circular shape on slider rather than traditional iOS line shape slider.",
    "homepage": "https://github.com/KiranJasvanee/KJCurveSlider",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kiran Jasvanee": "[email protected]"
    },
    "source": {
        "git": "https://github.com/KiranJasvanee/KJCircularSlider.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Classes/**/*",
    "pushed_with_swift_version": "3.0.1"
}

Pin It on Pinterest

Share This