SnappingStepper

码农软件 · 软件分类 · 滑杆(Slider) · 2019-06-15 15:26:32

软件介绍

SnappingStepper 是用 Swift 写成的一个 UIStepper 的优雅的替代品,有拇指滑块,可更加灵活地控制数值更新。

使用示例:

let stepper = SnappingStepper(frame: CGRectMake(0, 0, 100, 40))
override func viewDidLoad() {
  super.viewDidLoad()
  // Configure the stepper like any other UIStepper. For example:
  //
  // stepper.continuous   = true
  // stepper.autorepeat   = true
  // stepper.wraps        = false
  // stepper.minimumValue = 0
  // stepper.maximumValue = 100
  // stepper.stepValue    = 1
  stepper.font            = UIFont(name: "TrebuchetMS-Bold", size: 20)
  stepper.fontColor       = UIColor.blackColor()
  stepper.backgroundColor = UIColor.redColor()
  stepper.thumbColor      = UIColor.orangeColor()
  stepper.addTarget(self, action: "valueChanged:", forControlEvents: .ValueChanged)
  // If you don't want using the traditional `addTarget:action:` pattern you can use
  // the `valueChangedBlock`
  // snappingStepper.valueChangeBlock = { (value: Double) in
  //    println("value: \(value)")
  // }
  view.addSubview(stepper)
}
func valueChanged(sender: AnyObject) {
  // Retrieve the value: stepper.value
}

screenshot"

本文地址:https://codercto.com/soft/d/8034.html

价值再定义(腾讯金融产品体验设计之道)

价值再定义(腾讯金融产品体验设计之道)

腾讯FiT Design / / 电子工业 / 2018-08-01 / 81.0

一起来看看 《价值再定义(腾讯金融产品体验设计之道)》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具