Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kkla320/gaugeprogressviewstyle
GaugeProgressViewStyle adds the Apple Watch gauge view to iOS.
https://github.com/kkla320/gaugeprogressviewstyle
ios swift swiftui
Last synced: 2 days ago
JSON representation
GaugeProgressViewStyle adds the Apple Watch gauge view to iOS.
- Host: GitHub
- URL: https://github.com/kkla320/gaugeprogressviewstyle
- Owner: kkla320
- License: mit
- Created: 2021-09-26T10:21:20.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2022-07-26T08:51:11.000Z (over 2 years ago)
- Last Synced: 2024-12-30T22:41:39.602Z (21 days ago)
- Topics: ios, swift, swiftui
- Language: Swift
- Homepage:
- Size: 985 KB
- Stars: 37
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](logo.png)
[![Swift](https://github.com/kkla320/GaugeProgressViewStyle/actions/workflows/swift.yml/badge.svg?branch=develop&event=push)](https://github.com/kkla320/GaugeProgressViewStyle/actions/workflows/swift.yml) ![](https://img.shields.io/badge/Swift-5.5-orange) ![](https://img.shields.io/badge/spm-compatible-green)
GaugeProgressViewStyle adds the Apple Watch gauge view to iOS.
## Installation
To install GaugeProgressViewStyle, add GaugeProgressViewStyle as a dependency to your Package.swift file.
```swift
.package(url: "https://github.com/kkla320/GaugeView.git", from: "1.0.0")
```## Usage
Simply use the `progressViewStyle` method of `ProgressView` and pass the GaugeProgressViewStyle via one of the static members named `gauge`.
Please have a look in the [wiki](https://github.com/kkla320/GaugeProgressViewStyle/wiki) for detailed documentation.Code
Result
```swift
ProgressView(value: 0)
.progressViewStyle(.gauge())
```
![No parameters](Screenshots/sample_withoutParameters.png)
```swift
ProgressView(value: 0.5)
.progressViewStyle(.gauge(thickness: 20))
```
![Custom thickness](Screenshots/sample_withCustomThickness.png)
```swift
ProgressView(value: 0.5) {
Text("Gauge")
}
.progressViewStyle(.gauge())
```
![With label](Screenshots/sample_withLabel.png)
```swift
ProgressView(value: 0.5)
.progressViewStyle(
.gauge {
Text("12")
} upperLabel: {
Text("24")
}
)
```
![With upper lower labels](Screenshots/sample_withTextUpperAndLowerLabel.png)
```swift
ProgressView(value: 0.5)
.progressViewStyle(
.gauge {
Image(systemName: "sun.max.fill")
} upperLabel: {
Image(systemName: "cloud.rain.fill")
}
)
```
![With upper lower images](Screenshots/sample_withImageUpperAndLowerLabel.png)
## Requirements
- Swift 5.5
- iOS 14 and above## Contributing
Simply create a pull request.