GaugeProgressViewStyle adds the Apple Watch gauge view to iOS.

Overview

Swift

GaugeProgressViewStyle adds the Apple Watch gauge view to iOS.

Installation

To install GaugeProgressViewStyle, add GaugeProgressViewStyle as a dependency to your Package.swift file.

.package(url: "https://github.com/kkla320/GaugeView.git", from: "1.0.0-beta.2")

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 for detailed documentation.

Code Result
ProgressView(value: 0)
  .progressViewStyle(.gauge())

No parameters

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

Custom thickness

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

With label

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

With upper lower labels

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

With upper lower images

Requirements

  • Swift 5.5
  • iOS 14 and above

Contributing

Simply create a pull request.

You might also like...
ProgressButton - Custom button class that displays a progress bar around it to gauge
ProgressButton - Custom button class that displays a progress bar around it to gauge

ProgressButton Check it out To run the example project, clone the repo, and open the 'Example/Example.xcodeproj' file. Requirements This component is

Superhero-composable-watch-example - A superhero themed experiment using the swift composable architecture on a SwiftUI/Combine iOS app and Watch extension Create your own faces for watchOS.  Customize the watch hands, layout, colors, and images.  Edit faces on your phone and switch them on the watch.
Create your own faces for watchOS. Customize the watch hands, layout, colors, and images. Edit faces on your phone and switch them on the watch.

AppleWatchFaces Design your own watch faces for the apple watch. They are not real watch faces, but a watchOS app running on the watch that tells you

Collect payments with iPhone, Apple Watch, and Siri using Apple Pay

Offering Apple Pay in Your App Collect payments with iPhone, Apple Watch, and Si

To view plurk on Apple Watch
To view plurk on Apple Watch

PlurkOnWatch To view plurk on Apple Watch. Device that you need iPhone Apple Watch How to use Install APP on your iPhone & Apple Watch Login from iPho

To view plurk on Apple Watch
To view plurk on Apple Watch

PlurkOnWatch To view plurk on Apple Watch. Device that you need iPhone Apple Watch How to use Install APP on your iPhone & Apple Watch Login from iPho

This is a small View modifier that adds detents for native .sheet representations that appeared in iOS 16

SheetDetentsModifier This is a small View modifier that adds detents for .sheet representations that appeared in iOS 16 It works starting with iOS 15

Liquid SDK for iOS & Apple Watch

Quick Start to Liquid SDK for iOS & Apple Watch This document is just a quick start introduction to Liquid SDK for iOS. You can read the full document

A library, which adds the ability to hide navigation bar when view controller is pushed via hidesNavigationBarWhenPushed flag
A library, which adds the ability to hide navigation bar when view controller is pushed via hidesNavigationBarWhenPushed flag

HidesNavigationBarWhenPushed A library, which adds the ability to hide navigation bar when view controller is pushed via hidesNavigationBarWhenPushed

Shimmer: A super-light modifier that adds a shimmering effect to any SwiftUI View
Shimmer: A super-light modifier that adds a shimmering effect to any SwiftUI View

SwiftUI-Shimmer ✨ Shimmer is a super-light modifier that adds a shimmering effec

SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view.

SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view. You will be able to layout the margins in a CSS/Flutter-like.

A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background
A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background

Atmos A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background. "Ima use this in my app..." Introducing Metal to S

A fancy hexagonal layout for displaying data like your Apple Watch
A fancy hexagonal layout for displaying data like your Apple Watch

Hexacon is a new way to display content in your app like the Apple Watch SpringBoard Highly inspired by the work of lmmenge. Special thanks to zenly f

A simple Apple Watch app to remind you to drink water!
A simple Apple Watch app to remind you to drink water!

Waterminder A simple Apple Watch app to remind you to drink water. Built with SwiftUI and Combine You can find an article explaining the implementatio

Make Apple Watch data transfer rate from iPhone go brrrrrrrr

NanoFi Speed up data transfer from iOS to Apple Watch rate By default, Apple Watch prioritized Bluetooth connection, which makes transferring of music

A calculator for your Apple Watch but only if you have fingers small enough to press the buttons.
A calculator for your Apple Watch but only if you have fingers small enough to press the buttons.

AppleWatchCalculator A calculator for your Apple Watch but only if you have fingers small enough to press the buttons. A very simple calculator on you

Remake of Nintendo's Octopus Game & Watch device for Apple TV 4
Remake of Nintendo's Octopus Game & Watch device for Apple TV 4

Octopus Remake of Nintendo's Octopus Game & Watch device for Apple TV 4. Written in Swift. Simulator controls Use keyboard and remote Press Play/Pause

Diabetes: test the FreeStyle Libre glucose sensor as a Bluetooth Low Energy device, even directly from an Apple Watch.
Diabetes: test the FreeStyle Libre glucose sensor as a Bluetooth Low Energy device, even directly from an Apple Watch.

Since the FreeStyle Libre 2 / 3 glucose sensors are Bluetooth Low Energy devices, I am trying to leverage their capabilities to implement something ne

 Apple Watch App made for my friends 🦄 Unicorn Witnesses
Apple Watch App made for my friends 🦄 Unicorn Witnesses

Mute It Watch App Apple Watch App made for my friends 🦄 Unicorn Witnesses App for mental health. Water dropping sound helps to avoid discomfort for p

Comments
  • Error regarding the Angles

    Error regarding the Angles

    Hi. I have added this package to my project. But after adding this package I got these errors and tried to use .gauge style for my progressView, I got these errors.

    1- Argument type 'SwiftUI.Angle' does not conform to expected type 'Trigonometry.Angle' (CGPoint+init.swift) 2- Type 'ProgressViewStyle' has no member 'gauge' (ContentView.swift)

    opened by MunirehHosseinzada 7
Releases(1.0.2)
Owner
null
A simple circular progress view for iOS

CircularProgress A simple circular progress view for iOS. TODOs Gradient Colors Shadow Paths & Colors Multiplied Progress (i.e. progress > 1.0) Usage

i_82 10 Nov 11, 2022
A Circular SwiftUI progress View

A Circular progress view. There are some controllers to let you customize the progress-view and see which one works better for you. This whole project

Mahdi Bahrami 8 May 7, 2022
AsyncView is a SwiftUI View for handling in-progress and error states when loading data asynchronously.

AsyncView AsyncView is a SwiftUI View for handling in-progress and error states when loading data asynchronously using async/await: See my blog post "

Ralf Ebert 41 Dec 20, 2022
Circular progress view for Titanium

ti.circularprogress Circular progress view for Titanium. Using https://github.com/kaandedeoglu/KDCircularProgress (iOS) and https://github.com/owl-93/

null 12 Oct 2, 2022
TTProgressHUD is a light weight HUD written in SwiftUI meant to display the progress of an ongoing task on iOS.

TTProgressHUD TTProgressHUD is a light weight HUD written in SwiftUI meant to display the progress of an ongoing task on iOS. TTProgressHUD (left) was

Tobias Totzek 184 Dec 27, 2022
Easily show HUDs with SwiftUI! Lightweight SwiftUI wrapper for JGProgressHUD for iOS, tvOS, Catalyst.

JGProgressHUD-SwiftUI This is a lightweight and easy-to-use SwiftUI wrapper for JGProgressHUD, giving you access to the large and proven feature set o

Jonas Gessner 78 Dec 21, 2022
Snake Progress shows circular progress for iOS Apps.

SnakeProgress SnakeProgress shows circular progress for iOS Apps. With SnakeProgress With SnakeProgress, you can easily circular progress. @IBOutlet w

null 8 Sep 22, 2022
Easy to use, highly customizable gauge view

GDGauge - Customizable Gauge View Requirements Xcode 11+ Swift 5 iOS 9+ Installation Swift Package Manager .package(url: "https://github.com/saeid/GDG

Saeid 74 Dec 5, 2022
Terminal Watch Face for Apple Watch

Terminal Watch Face for Apple Watch

Gábor Librecz 1.9k Dec 29, 2022
RainbowGaugeSwiftUI - Rainbow Gauge made with SwiftUI

RainbowGaugeSwiftUI Rainbow Gauge made with SwiftUI.

Shreyas Bhike 10 Jan 6, 2023