Latest 1.2
License MIT
Platforms ios 10.0


PivotSlider shows the track of value from the pivot.



CocoaPods manages library dependencies for your Xcode projects. For usage, see CocoaPods Guides – Using CocoaPods.

target '<Your Project Name>' do
    pod 'PivotSlider', '~> 1.2'


Carthage is intended to be the simplest way to add frameworks to your Cocoa application. For usage, see Carthage – Adding frameworks to an application.

github "lab111/pivot-slider" ~> 1.2


PivotSlider consists of three UI components, track, valueTrack, and thumb, which are all of type UIView. So you can configure them just the same way you configure UIView. For example,

self.pivotSlider.track.backgroundColor =
self.pivotSlider.valueTrack.backgroundColor =
self.pivotSlider.thumb.layer.cornerRadius = 10.0

PivotSlider uses four values to define itself:

  • var minimumValue: Float = -1.0
  • var maximumValue: Float = 1.0
  • var pivotValue: Float = 0.0
  • var value: Float = 0.0

Other than that, isContinuous indicates whether changes in the slider’s value generate continuous update events. If it’s false, you will only be notified when the user releases the slider’s thumb.


import PivotSlider

self.pivotSlider = PivotSlider(frame: CGRect(x: 0, y: 0, width: 100, height: 100))

PivotSlider uses the Target-Action design pattern to notify your app when the user moves the slider. To be notified when the slider’s value changes, register your action method with the valueChanged event. At runtime, the slider calls your method in response to the user sliding thumb. Here is an example:

self.pivotSlider.addTarget(self, action: #selector(self.doSomething(with:)), for: .valueChanged)

func doSomething(with pivotSlider: PivotSlider) {


PivotSlider is released under the MIT license. For details, see LICENSE.

Latest podspec

    "name": "PivotSlider",
    "version": "1.2",
    "summary": "Pivot that slides",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Lab 7": "[email protected]"
    "platforms": {
        "ios": "10.0"
    "source": {
        "git": "",
        "tag": "1.2"
    "source_files": [
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3"
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This