Popularity
0.8
Stable
Activity
0.0
Stable
12
4
2

Programming language: Swift
Tags: UI     Slider    

VSVerticalSlider alternatives and similar libraries

Based on the "Slider" category.
Alternatively, view VSVerticalSlider alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of VSVerticalSlider or a related project?

Add another 'Slider' Library

README

VerticalSlider

An animatable and customizable vertical slider written in Swift 4.

Quick Start

VerticalSliderPlayground

  1. Clone Repo
  2. Open VSVerticalSlider.xcworkspace
  3. In the file navigator open VSVerticalSliderPlayground
  4. Build with iPhone 8 set as device
  5. Open assistent editor and set to Live View

For more information on interactive playgrounds read this blog post by Apple Developer

Sample Project

  1. Clone Repo
  2. Open VSVerticalSliderSample.xcworkspace
  3. Build and run.

Installation

CocoaPods

VSVerticalSlider can be installed with CocoaPods by adding this to your Podfile:

platform :ios, โ€™10.0โ€™

target 'VerticalSliderSample' do

  use_frameworks!
  pod 'VSVerticalSlider', :git => 'https://github.com/vsmithers1087/VerticalSlider.git'

end

Setup

  1. Create VSVerticalSlider with height, color, and optional x, y offsets
  2. Set the slider's delegate to self
  3. Add to your UIView

    override func viewDidLoad() {
        super.viewDidLoad()
        setupSlider()
    }
    
    private func setupSlider() {
        let slider = VSVerticalSlider(height: 500.0 - 13, primaryColor: UIColor.red, offsetX: 20, offsetY: 40.0)
        slider.delegate = self
        view.addSubview(slider)
    }
    

    Conforming to VerticalSliderDelegate

    Receive a callback everytime the slider value changes

    extension ViewController: VSVerticalSliderDelegate {
    func valueDidChange(value: Int) {
        percentageLabel.text = "\(value) %"
    }
    }
    

    Setting Slider Value

    //A value between 0 and 100
    let newValue = 51
    slider.setValue(newValue)
    

Todo

  • [x] Add Readme
  • [ ] Setup With Storyboards
  • [ ] Carthage Support
  • [ ] Unit Tests

Prerequisites

  • Xcode 9.0 +
  • Swift 4.0 +
  • iOS 10.0 +

Contributing

All feedback and suggestions are welcome. If you see an issue, would like to make a change, or add a feature please make a pull request.

License

VerticalSlideris released under the [MIT License](LICENSE).


*Note that all licence references and agreements mentioned in the VSVerticalSlider README section above are relevant to that project's source code only.