StepProgressIndicatorView
示例
要运行示例项目,首先从仓库克隆,然后在 Example 目录中运行 pod install
安装
StepProgressIndicatorView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod 'StepProgressIndicatorView'
用法
let stepIndicatorView = StepProgressIndicatorView(frame: self.view.bounds)
stepIndicatorView.stepTitles = ["One", "Two", "Three", "Four"]
stepIndicatorView.details = [0: "First", 1: "Second"]
stepIndicatorView.direction = .topToBottom // set direction leftToRight, topToBottom ...
stepIndicatorView.currentStep = 0 // set
外观
字体和大小
stepIndicatorView.textFont = .systemFont(ofSize: 16)
stepIndicatorView.detailFont = .systemFont(ofSize: 12)
行间距
stepIndicatorView.lineStrokeWidth = 2.0
stepIndicatorView.lineMargin = 4.0
stepIndicatorView.lineWidth = 1.0
stepIndicatorView.verticalPadding = 3
stepIndicatorView.horizontalPadding = 4
更改颜色
stepIndicatorView.circleColor = .lightGray
stepIndicatorView.circleTintColor = .systemTeal
stepIndicatorView.currentTextColor = .black
stepIndicatorView.pastTextColor = .black
stepIndicatorView.futureTextColor = .lightGray
stepIndicatorView.currentDetailColor = .black
stepIndicatorView.pastStepFillColor = .gray
stepIndicatorView.currentStepFillColor = .systemTeal
stepIndicatorView.futureStepFillColor = .lightGray
stepIndicatorView.lineColor = .lightGray
stepIndicatorView.lineTintColor = .gray
作者
miiiiiin, [email protected]
许可
StepProgressIndicatorView 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。