SnappingStepper
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/YannickL/SnappingStepper
软件介绍
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 }
The Apache Modules Book
Nick Kew / Prentice Hall PTR / 2007-02-05 / USD 54.99
"Do you learn best by example and experimentation? This book is ideal. Have your favorite editor and compiler ready-you'll encounter example code you'll want to try right away. You've picked the right......一起来看看 《The Apache Modules Book》 这本书的介绍吧!