Support | Version |
---|---|
iOS | 9.0 |
Swift | 4.0 |
ProgressMeter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ProgressMeter'
Drag & drop a UIView from the object library and follow the steps:
Step 1
Step 2
Hook your view (ProgressMeter) property on your view controller and try out the snippets inside viewDidLoad;
Snippet # 1: Looking for setting up the control with your own data 👨🏫
func setupWithCustomData() {
progressControl.maxValue = 20000
progressControl.data = [1999, 4999, 9999, 14999]
progressControl.progress = 14999 / 20000
}
Snippet # 2: Don't have the data set? ProgressMeter can create its own data 🔢
func setupWithControlData() {
progressControl.maxValue = 20000
progressControl.numberOfDivisions = 4
progressControl.progress = 0.4
}
Snippet # 3: Setup the visual aspect 💄
func visualSetup() {
progressControl.progressTintColor = .purple�
progressControl.trackTintColor = .gray
progressControl.borderWidth = 1
progressControl.borderColor = .darkGray
progressControl.annotationTextColor = .purple
progressControl.dividerColor = .darkGray
}
- Some tweakings required to use ProgressMeter inside a Stack View
- Annotations on bottom; Currenty annotations can only display on the top of ProgressMeter
Web: Khawaja Farooq
Twitter: @khfarooq
Medium: @khfarooq
ProgressMeter is available under the MIT license. See the LICENSE file for more info.