TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2016 |
SPMSupports SPM | ✗ |
Maintained by Dmitry Klimkin.
Generic scale and a handy float-value picker for any iOS app.
Download repository, then add ScalePicker directory to your project.
platform :ios, '8.0'
use_frameworks!
pod 'ScalePicker'
Instantiate scale view with preferred frame:
let screenWidth = UIScreen.mainScreen().bounds.size.width
let scaleView = ScalePicker(frame: CGRectMake(0, 0, screenWidth, 50))
view.addSubview(scaleView)
scaleView.minValue = -3.0
scaleView.maxValue = 3.0
scaleView.numberOfTicksBetweenValues = 2
scaleView.spaceBetweenTicks = 20.0
scaleView.showTickLabels = true
scaleView.delegate = self
scaleView.snapEnabled = true
scaleView.bounces = false
scaleView.tickColor = UIColor.whiteColor()
scaleView.centerArrowImage = UIImage(named: "arrowPointer")
scaleView.increaseValue()
scaleView.decreaseValue()
scaleView.reset()
In addition to increase/decrease/reset actions ScaleView allows you to double tap to trigger reset action
For more details try Xcode Demo project
Tweet the author @dklimkin, and check out Dmitry’s portfolio: http://dmitry-klimkin.com
ScalePicker is released under the MIT license. See LICENSE for details.