VerticalSlider is a vertical slider control for iOS in Swift.

Overview

🎚 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: [email protected] IMPORTANT: Before emailing me, please read this.

License

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

Comments
  • Auto layout problem

    Auto layout problem

    I am using Xcode 9.4 and I am getting:

    "file:///Users/shane/data/src/vssl/vssl_ios/VSSL/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for AdvancedEqViewController (GAS-CK-jHf): dlopen(VerticalSlider.framework, 1): no suitable image found. Did find: VerticalSlider.framework: required code signature missing for 'VerticalSlider.framework'"

    opened by hanssl 1
  • sender.tag in IBAction

    sender.tag in IBAction

    when using multiple VerticalSlider and hooking them all to a single IBAction method, the attempt to identify the sender using tag or isEqual will fail.

    The reason is that the sender is not the VerticalSlider instance but the internal UISlider, please fix it.

    opened by Benny-iPhone 1
  • M_PI deprecated

    M_PI deprecated

        fileprivate func updateSlider() {
            if !ascending {
    //            slider.transform = CGAffineTransform(rotationAngle: CGFloat(M_PI) * -0.5)
                slider.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi) * -0.5)
            } else {
    //            slider.transform = CGAffineTransform(rotationAngle: CGFloat(M_PI) * 0.5).scaledBy(x: 1, y: -1)
                slider.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi) * 0.5).scaledBy(x: 1, y: -1)
            }
            
            slider.minimumValue = minimumValue
            slider.maximumValue = maximumValue
            slider.value = value
            slider.thumbTintColor = thumbTintColor
            slider.minimumTrackTintColor = minimumTrackTintColor
            slider.maximumTrackTintColor = maximumTrackTintColor
            slider.isContinuous = isContinuous
        }
    
    opened by iDevelopper 1
  • *** IMPORTANT: PLEASE READ BEFORE YOU OPEN A NEW ISSUE! ***

    *** IMPORTANT: PLEASE READ BEFORE YOU OPEN A NEW ISSUE! ***

    Thank you for your interest in VerticalSlider!

    I have received a surprising amount of questions about VerticalSlider since putting it up here. A few people in the community have identified some problems and helped contribute to VerticalSlider to make it better for everyone and I'm truly grateful for the support! Keep them coming!

    I have also received a number of questions about people having issues implementing VerticalSlider, mostly from beginners learning how to code. As much as I would love to help all of you, I simply do not have the time to teach you. That's why I spent a lot of time putting together a detailed README, adding comments about usage in code, and providing a demo project. These will give you all the information you need to work through any problem and also save me the time it takes to personally respond. It is faster for you to figure it out for yourself instead of waiting for me to respond to you.

    If your question starts with "How do I...", that's not a bug. Stay persistent, try a few different things, and you will figure it out! I also recommend searching and posting your questions on stackoverflow.com. Or, if you're interested in hiring me to teach you, please email me using the email address listed at the bottom of my README.

    Again, please do not email me or open any issues if you want to know how to use VerticalSlider or are having trouble getting it to work. However, if you think you found a bug, please open an issue and I will respond to it as quickly as I can. Ideally, you can demonstrate the bug in the demo project which has a minimal amount of code.

    Thanks again for your support and for being respectful of my time.

    opened by jonkykong 0
  • Vertical shadow thumb image

    Vertical shadow thumb image

    Thanks for this nice class. Do you have any idea how to make the thumb images shadow also appear below the thumb image as it does on the horizontal version of the UISlider?

    opened by BrunoBieri 0
Owner
Jon Kent
Freelance Designer & iOS Developer. Hire me to help you make cool stuff.
Jon Kent
A custom reusable slider control with 2 thumbs (range slider).

MARKRangeSlider A custom reusable slider control with 2 thumbs (range slider). Values range is between minimumValue and maximumValue (from 0 to 1 by d

Vadym Markov 181 Nov 21, 2022
PhotoSlider is a simple photo slider and can delete slider with swiping.

PhotoSlider is a simple photo slider and can delete slider with swiping.

Daichi Nakajima 247 Nov 30, 2022
A beautiful slider control for iOS built purely upon Swift

SnappingSlider A beautiful slider control for iOS. Installation There are two ways to add the control to your project; you can add it as a submodule i

Rehat Kathuria 577 Dec 15, 2022
This is an iOS Tweak that modifies the brightness slider in the Control Center.

AdvancedBrightnessSlider Tweak This is an iOS Tweak that modifies the brightness slider in the Control Center. Even with dark mode toggled on, I found

Jonas Schiefner 18 Jan 5, 2023
A custom reusable circular / progress slider control for iOS application.

HGCircularSlider Example To run the example project, clone the repo, and run pod install from the Example directory first. You also may like HGPlaceho

Hamza Ghazouani 2.4k Jan 4, 2023
iOS 11 Control Center Slider

SectionedSlider Control Center Slider Requirements Installation Usage License Requirements iOS 8.0+ Swift 3.0+ Xcode 8.0+ Installation CocoaPods Cocoa

Leonardo Cardoso 361 Dec 3, 2022
A feature-rich circular slider control written in Swift.

MTCircularSlider Screenshot Usage To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 1

Eran Boudjnah 132 Jan 1, 2023
VolumeControl is a custom volume control for iPhone featuring a well-designed round slider.

#VolumeControl VolumeControl is a custom volume control for iPhone featuring a well-designed round slider. Preview Usage // Include VolumeControl.h in

12Rockets 81 Oct 11, 2022
UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizontal.

MultiSlider UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizo

Yonat Sharon 326 Dec 29, 2022
An iOS Slider written in Swift.

JDSlider Beetripper App's screenshots Example Project To run the example project, clone the repo, and run pod install from the Example directory first

Jelly Development 84 Jul 26, 2022
Use UIResponder to imitate an iOS slider.

WWSlider Use UIResponder to imitate an iOS slider. 使用UIResponder仿造一個iOS的滑桿. Installation with Swift Package Manager dependencies: [ .package(url:

William-Weng 2 May 5, 2022
Customizable animated slider for iOS

MMSegmentSlider MMSegmentSlider is an easy-to-use IBDesignable animated slider for iOS 7+ written in Objective-C. Installation From CocoaPods CocoaPod

Max Medvedev 48 Jul 26, 2022
Customizable animated slider for iOS

MMSegmentSlider MMSegmentSlider is an easy-to-use IBDesignable animated slider for iOS 7+ written in Objective-C. Installation From CocoaPods CocoaPod

Max Medvedev 48 Jul 26, 2022
An iOS-16-styled slider.

Slyderin An iOS-16-styled slider. Available on iOS 13 and later. Slyderin.Demo.mov How to Use Include it with Swift Package Manager. Add it to your vi

iMoeNya 3 Jan 1, 2023
IntervalSlider is a slider library like ReutersTV app. written in pure swift.

IntervalSlider Description and appetize.io`s DEMO To run the example project, clone the repo, and run pod install from the Example directory first. Re

Nobuyasu 65 May 23, 2021
A simple range slider made in Swift

RangeSlider Summary A simple range slider made in Swift. Screenshot Use This control is IBDesignable and uses the target-action pattern for change not

William Archimede 305 Nov 29, 2022
CircleSlider is a Circular slider library. written in pure Swift.

CircleSlider Description and appetize.io`s DEMO Usage To run the example project, clone the repo, and run pod install from the Example directory first

Nobuyasu 142 May 9, 2022
A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable.

CircularSlider A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable. Demo Installation Circu

Matteo Tagliafico 253 Sep 19, 2022
💧 A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by @Ramotion

FLUID SLIDER A slider widget with a popup bubble displaying the precise value selected written on Swift. We specialize in the designing and coding of

Ramotion 1.9k Dec 23, 2022