Skip to content

Instantly share code, notes, and snippets.

@scottmatthewman
scottmatthewman / SegmentedProgressView.swift
Created April 27, 2020 12:47
Building a custom progress view in SwiftUI
/// This code is designed to be copied and pasted into a Swift Playground.
/// It will work in Xcode (macOS only) or Swift Playgrounds (on iPad or macOS).
import SwiftUI
import PlaygroundSupport
struct SegmentedProgressView: View {
var value: Int
var maximum: Int = 7
var height: CGFloat = 10
var spacing: CGFloat = 2