https://github.com/kkla320/gaugeprogressviewstyle
GaugeProgressViewStyle adds the Apple Watch gauge view to iOS.
https://github.com/kkla320/gaugeprogressviewstyle
ios swift swiftui
Last synced: 6 months 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 (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-07-26T08:51:11.000Z (almost 3 years ago)
- Last Synced: 2024-12-30T22:41:39.602Z (6 months 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

[](https://github.com/kkla320/GaugeProgressViewStyle/actions/workflows/swift.yml)  
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())
```

```swift
ProgressView(value: 0.5)
.progressViewStyle(.gauge(thickness: 20))
```

```swift
ProgressView(value: 0.5) {
Text("Gauge")
}
.progressViewStyle(.gauge())
```

```swift
ProgressView(value: 0.5)
.progressViewStyle(
.gauge {
Text("12")
} upperLabel: {
Text("24")
}
)
```

```swift
ProgressView(value: 0.5)
.progressViewStyle(
.gauge {
Image(systemName: "sun.max.fill")
} upperLabel: {
Image(systemName: "cloud.rain.fill")
}
)
```

## Requirements
- Swift 5.5
- iOS 14 and above## Contributing
Simply create a pull request.