Swift厚度选择器 0.6.1

Swift厚度选择器 0.6.1

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布上次发布2018年9月
SPM支持SPM

Maxim Bilan维护。



  • 作者:
  • Maxim Bilan

Swift厚度选择器

Version License Platform CocoaPods CocoaPods

一个简单的iOS厚度选择器。
支持两种模式:垂直和水平。

alt tag

安装

CocoaPods

pod 'SwiftThicknessPicker'

手动

Copy SwiftThicknessPicker.swift to your project.

使用

你可以从StoryboardXIB中创建它。或者手动创建

let picker = SwiftThicknessPicker()

为了处理值的改变,你应该实现协议SwiftThicknessPickerDelegate

picker.delegate = self

func valueChanged(value: Int)
}

方向

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

你还可以更改当前值、最大值或最小值,例如

picker.currentValue = 0
picker.maxValue     = 30
picker.minValue     = 1

和其他设置

labelFontColor        // Font color of the moving label
labelBackgroundColor  // Background color of the moving label
labelFont             // Font of the moving label

许可证

Swift厚度选择器在MIT许可证下可用。有关更多信息,请参阅LICENSE文件。