Skip to content
VerticalSlider is a vertical slider control for iOS in Swift.
Branch: 1.0.0
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example Initial commit. Sep 30, 2016
VerticalSlider Initial commit. Sep 30, 2016
etc Initial commit. Sep 30, 2016
.swift-version Specified Swift version 3. Sep 30, 2016
LICENSE Initial commit. Sep 30, 2016
README.md Updated README for Github. Sep 30, 2016
VerticalSlider.podspec Updated pod spec. Sep 30, 2016
_Pods.xcodeproj Initial commit. Sep 30, 2016

README.md

🎚VerticalSlider

Version License Platform

If you like VerticalSlider, give it a ★ at the top right of this page.

Overview

VerticalSlider is a vertical implementation of the UISlider control. Visual properties of the slider have been exposed through interface builder. The underlying UISlider control can be accessed through VerticalSlider's slider property.

Check out the example project to see it in action!

Requirements

  • Swift 3
  • iOS 8 or higher

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate VerticalSlider into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'VerticalSlider'

Then, run the following command:

$ pod install

Usage

Storyboard Implementation

  1. Create a View for a VerticalSlider. Set the custom class of the View to be VerticalSlider in the Identity Inspector. Interface Builder should update the view to show a VerticalSlider.

  2. Configure VerticalSlider's properties any way you like!

Code Implementation

First:

import VerticalSlider

Next, declare your VerticalSlider at the top of your View Controller and link it in Interface Builder:

@IBOutlet var verticalSlider: VerticalSlider!

In your View Controller's viewDidLoad event, do something like this:

verticalSlider.slider.addTarget(self, action: #selector(sliderChanged), for: .valueChanged)

Then add the method that will be called when the slider's value changes:

func sliderChanged() {
    // your code here
    print(verticalSlider.value)
}

That's it.

About Me

My name is Jon Kent and I'm a freelance iOS designer, developer, and mobile strategist. I love coffee and play the drums. Hire me!

🌎 Web: http://jonkent.me

✉️ Email: contact@jonkent.me IMPORTANT: Before emailing me, please read this.

License

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

You can’t perform that action at this time.