A simple iOS thickness picker.
Supports two modes: vertical and horizontal.
CocoaPods:
pod 'SwiftThicknessPicker'
Manual:
Copy SwiftThicknessPicker.swift to your project.
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 // A font color of the moving label labelBackgroundColor // A background color of the moving label labelFont // A font of the moving label
SwiftThicknessPicker is available under the MIT license. See the LICENSE file for more info.