测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布上次发布 | Sep 2016 |
SPM支持 SPM | ✗ |
维护者: Nagasawa Hiroki。
Medium Progress View in Swift like a Medium Web application Progress View.
Inspired by KIProgressView. I made that a reference and customized a fine point.
将 MediumProgressView(包括 MediumProgressView.swift 和 MediumProgressViewManager.swift 文件夹)添加到您的项目中。
您可以设置某些属性。例如,位置和颜色,高度,持续时间等。如果您没有设置这些属性,将使用默认值。
let progressViewManager = MediumProgressViewManager.sharedInstance
progressViewManager.position = .bottom // Default is top.
progressViewManager.color = UIColor.red // Default is UIColor(red:0.33, green:0.83, blue:0.44, alpha:1).
progressViewManager.height = 2.0 // Default is 4.0.
progressViewManager.isLeftToRight = false // Default is true.
progressViewManager.duration = 2.0 // Default is 1.2.
progressViewManager.repeatCount = 3 // Default is infinity.
以下是一个显示方法。
progressViewManager.show()
以下是一个隐藏方法。
progressViewManager.hide()
有关更多信息,请参阅 MediumProgressView-Sample 项目。