SwiftUI 4 What’s New — Gauge View

Alessandro Manilii
3 min readJun 7, 2022

An introduction to the Gauge View in SwiftUI 4

Photo by Michal Mrozek on Unsplash

SwiftUI 4 and iOS 16 have finally been released, at least for us developers, and they are packed with sooo much stuff that it will take month to discover and master everything.

One of the new Views introduced is the Gauge, that’s basically a progress indicator on steroids. Let’s take a look at it!

In it’s basic form it simply needs a value and a content:

You can easily customize it adding minimum/maximum and actual value:

You simply pass some views to the content and they will be added to the Gauge. Super powerful, super easy!

The default style for gauges is a linear, continuous bar with an indicator showing the current value, and optional labels describing the gauge’s purpose, current, minimum, and maximum values.

You can change the style of the Gauge with the modifier gaugeStyle :

--

--

Alessandro Manilii

I’m an Italian professional iOS Developer, iOS Tech Lead at Wakala — Join Medium from the following link: https://medium.com/@alessandromanilii/membership