iOS thickness picker
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:
For handling changing of values you should implement protocol SwiftThicknessPickerDelegate:
- let picker = SwiftThicknessPicker()
- 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:
And other settings:
- picker.currentValue = 0
- picker.maxValue = 30
- picker.minValue = 1
- 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.