Latest 2.0.1
Homepage https://github.com/hitendradeveloper/HSCenterSlider
License MIT
Platforms ios 9.0
Dependencies HSRange
Frameworks UIKit
Authors

License
Platform

Demo

HSCenterSlider

Example

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

Requirements

Swift XCode Tag/Pod version
3.x >= 8.x 2.0.1
4.x >= 9.x 2.0.1
5.x >= 10.x 2.0.1

Installation

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

pod 'HSCenterSlider'

How to use?

  1. Drag the UIView and drop in to the storybaord or XIB
  2. Give class HSHorizontalCenterSlider or HSVerticleCenterSlider to the view. That’s it.
  3. You center slider is ready to use in just two steps

More Usage

  • Change slider range between any two values, Default range is (-100,100)

    slider.rangeValue = HSRange(low: -200, high: 100)
  • Get value changes call back during user interaction using delegate method declared in the protocol HSCenterSliderDelegate

    func centerSlider(slider: HSCenterSlider, didChange value: Double)
  • Change the tint color of prograss view like a native UISlider
    slider.tintColor = UIColor.black
Possible Error:

[!] Unable to find a specification for 'HSCenterSlider'

Solution:
pod setup

Where to go from here?

Read series ‘Design patterns by Tutorials — The power of OOP’

Part-1: Faceted and Fluent Builder pattern in Swift

Part-2: Singleton Design Pattern in Swift

Read my latest series ‘Protocol — The power of Swift’

Part-1: What are type-casting and class-types?

Part-2: Conforming a protocol

Part-3: Protocol composition

Part-4: My rule of thumb for possible data types

Part-5: Protocol as a super-type

Author

Hitendra Solanki, [email protected]

Find my repositories on Github

Read my blogs on Medium

Connect me via LinkedIn

Follow me on Twitter

License

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

Latest podspec

{
    "name": "HSCenterSlider",
    "version": "2.0.1",
    "summary": "Easy to use double side center slider, that can show value in (A,B) Range.",
    "description": "Easy to use double side center slider, that can show value in (A,B) Range.nWhere center of the slider is (A+B)/2.nSupports both Horizonal and Verticle UI for the slider.nE.g.n1. If your range if (-100,100) then center point of slider will be 0.n1. If your range if (-80,100) then center point of slider will be 10.",
    "homepage": "https://github.com/hitendradeveloper/HSCenterSlider",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "hitendradeveloper": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hitendradeveloper/HSCenterSlider.git",
        "tag": "2.0.1"
    },
    "social_media_url": "https://twitter.com/hitendrahckr",
    "platforms": {
        "ios": "9.0"
    },
    "swift_versions": [
        "4.0",
        "4.1",
        "4.2",
        "4.3",
        "5.0"
    ],
    "source_files": "HSCenterSlider/Classes/**/*",
    "resource_bundles": {
        "HSCenterSlider": [
            "HSCenterSlider/Assets/**/*"
        ]
    },
    "frameworks": "UIKit",
    "dependencies": {
        "HSRange": [
            "5.0.11"
        ]
    }
}

Pin It on Pinterest

Share This