项目作者: maximbilan

项目描述 :
iOS thickness picker
高级语言: Swift
项目地址: git://github.com/maximbilan/SwiftThicknessPicker.git
创建时间: 2015-05-12T07:22:41Z
项目社区:https://github.com/maximbilan/SwiftThicknessPicker

开源协议:MIT License

下载


Swift Thickness Picker

Version
License
Platform
CocoaPods
CocoaPods

A simple iOS thickness picker.

Supports two modes: vertical and horizontal.

alt tag

Installation

CocoaPods:

  1. pod 'SwiftThicknessPicker'

Manual:

  1. Copy SwiftThicknessPicker.swift to your project.

Using

You can create from Storyboard or XIB. Or create manually:

  1. let picker = SwiftThicknessPicker()
For handling changing of values you should implement protocol SwiftThicknessPickerDelegate:
  1. picker.delegate = self
  2.  
  3. func valueChanged(value: Int)
  4. }

Direction:

  1. picker.direction = SwiftThicknessPicker.PickerDirection.Vertical // Vertical, Horizontal

Also, you can change current value, the maximum value or minimum value, for example:

  1. picker.currentValue = 0
  2. picker.maxValue = 30
  3. picker.minValue = 1
And other settings:
  1. labelFontColor // A font color of the moving label
  2. labelBackgroundColor // A background color of the moving label
  3. labelFont // A font of the moving label

License

SwiftThicknessPicker is available under the MIT license. See the LICENSE file for more info.