Skip to content

iOS-AllProjects/EYSlider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EYSlider

Custom slider bar written in swift 4.

Screenshots

simulator screen shot apr 15 2017 3 52 52 pm simulator screen shot apr 15 2017 3 54 20 pm

Install

Requirements
  • iOS 10.0+
  • Swift 4.0+
Manual

Copy & paste CustomSlider.swift in your project

CocoaPods

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!

Usage

Drag a UIView into your storyboard! Change the class to CustomSlider. The view will be updated!

In storyboard Edit the following properties!

For the View

animationDuration viewBackColor viewCornerRadius

For border Layer

borderBackColor borderColor borderWidth

For tracker Layer

positiveTrackColor negativeTrackColor

For handle Layer

handleBackColor handleShadowColor

For the values

MaxValue sliderValue

Create an Outlet for the Control!

    @IBOutlet weak var slider: CustomSlider! 

Access Properties of your Outlet and modify to your needs!

    //Example
    let currentValue = "\(slider.value)"

And that's it!