Swift Thickness Picker
A simple iOS thickness picker.
Supports two modes: vertical and horizontal.
Installation
CocoaPods:
pod 'SwiftThicknessPicker'
Manual:
Copy SwiftThicknessPicker.swift to your project.
Using
You can create from Storyboard or XIB. Or create manually:
let picker = SwiftThicknessPicker()
For handling changing of values you should implement protocol SwiftThicknessPickerDelegate:
picker.delegate = self func valueChanged(value: Int) }
Direction:
picker.direction = SwiftThicknessPicker.PickerDirection.Vertical // Vertical, Horizontal
Also, you can change current value, the maximum value or minimum value, for example:
picker.currentValue = 0 picker.maxValue = 30 picker.minValue = 1
And other settings:
labelFontColor // Font color of the moving label labelBackgroundColor // Background color of the moving label labelFont // Font of the moving label
License
SwiftThicknessPicker is available under the MIT license. See the LICENSE file for more info.