Skip to content

Latest commit

 

History

History
94 lines (72 loc) · 2.33 KB

README.md

File metadata and controls

94 lines (72 loc) · 2.33 KB

G8SliderStep

=========== ***Custom Range UISlider for iOS, in Swift - Totally @IBInspectable ***

How it works

Samples

Features:

  • Ready to use
  • Easy customization (font, colors, images, ticks...)
  • @IBInspectable
  • Tappable
  • Draggable
  • Titles support
  • Rotation support

ToDo:

  • Add CocoaPods support

How to use:

Manual

  • Import G8SliderStep.swift in you project
  • Add UISlider in you Storyboard file
  • Set the UISlider class to G8SliderStep
  • Configure your slider by storyboard or/and by code
  • Enjoy :)

CocoaPods

TODO

Code configuration

@IBOutlet weak var sliderStep: G8SliderStep!

override func viewDidLoad() {
        super.viewDidLoad()

///G8SliderStep configuration
	sliderStep.stepImages = [UIImage(named:"star")!, UIImage(named:"heart")!, UIImage(named:"house")!]
	sliderStep.tickTitles = ["STAR", "HEART", "HOUSE"]
	let shape = UIImage(named:"shape")!
    sliderStep.tickImages = [shape, shape, shape]
    sliderStep.minimumValue = 2
    sliderStep.maximumValue = Float(sliderStep.stepImages!.count) + sliderStep.minimumValue - 1.0
    sliderStep.trackColor = UIColor.darkGrayColor()
    sliderStep.stepTickColor = UIColor.orangeColor()
    sliderStep.stepTickWidth = 30
    sliderStep.stepTickHeight = 30
    sliderStep.trackHeight = 10
    }

Storyboard configuration

License

G8MaterialKitTextField is distributed under the MIT license (see LICENSE.md).

Contributors

Daniele Galiotto (founder) - iOS Freelance Developer - www.g8production.com