Custom slider bar written in swift 4.
- iOS 10.0+
- Swift 4.0+
Copy & paste CustomSlider.swift
in your project
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate EYSlider into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/iOS-AllProjects/EYSlider.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Project Name>' do
pod 'EYSlider', '0.1.0'
end
Or
source 'https://github.com/iOS-AllProjects/EYSlidersBar.git'
platform :ios, '10.0'
use_frameworks!
Drag a UIView
into your storyboard! Change the class to CustomSlider
. The view will be updated!
animationDuration viewBackColor viewCornerRadius
borderBackColor borderColor borderWidth
positiveTrackColor negativeTrackColor
handleBackColor handleShadowColor
MaxValue sliderValue
@IBOutlet weak var slider: CustomSlider!
//Example
let currentValue = "\(slider.value)"
And that's it!