Latest 2.0.0
Homepage https://github.com/BrianCorbin/SwiftRangeSlider
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

CocoaPods
CocoaPods
CocoaPods

This is a swift implementation of custom UIControl that allows users to select a range of values on a slider bar with 2 knobs.

Requirements

  • iOS 8.0+
  • Xcode 8+

Installation

CocoaPods

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

$ gem install cocoapods

CocoaPods 0.39.0+ is required to build SwiftRangeSlider.

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

platform :ios, ‘8.0’
use_frameworks!
target '[your_app_name]' do
  pod ‘SwiftRangeSlider’
end

Then, run the following command:

$ pod install

Usage

import SwiftRangeSlider

With Storyboards

To use SwiftRangeSlider on a storyboard, add a UIView to your view controller and set its class to RangeSlider. The Range Slider defaults to an iOS-esque style of slider, but it can be modified to look lots of different ways! There is even scaling on touch and labels, so be sure to experiment until you find exactly what you like!

SRS With Storyboards 1
SRS With Storyboards 2

Most of the customization parameters can be changed through IBDesignable and IBInspectable and should be reflected on the storyboard!

SRS With Storyboards 3

To reference the RangeSlider on your storyboard in your view controller’s file, create an @IBOutlet connection of type RangeSlider:

@IBOutlet weak var rangeSlider: RangeSlider!

Programmatically

let rangeSlider:RangeSlider = RangeSlider()

Latest podspec

{
    "name": "SwiftRangeSlider",
    "platforms": {
        "ios": "8.0"
    },
    "summary": "A Swift implementation of a custom UIControl for selecting a range of values on a slider bar.",
    "requires_arc": true,
    "version": "2.0.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Brian Corbin": "[email protected]"
    },
    "homepage": "https://github.com/BrianCorbin/SwiftRangeSlider",
    "source": {
        "git": "https://github.com/BrianCorbin/SwiftRangeSlider.git",
        "tag": "2.0.0"
    },
    "frameworks": "UIKit",
    "source_files": "SwiftRangeSlider/**/*.{swift}",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This