ProgressView(label: {
Text("Loading")
.font(.caption)
.foregroundColor(.secondary)
}
).progressViewStyle(.circular)
this is old version, you should update code like this :
//
// ContentView.swift
// ProgressIconandBar
//
// Created by WilliamJiamin on 2024/6/29.
//
import SwiftUI
struct ContentView: View {
var body: some View {
ProgressView(label: {
Text("Downloading...")
.font(.caption)
.foregroundStyle(.blue)
})
.progressViewStyle(CircularProgressViewStyle(tint: .blue))
.scaleEffect(2)
}
}
#Preview {
ContentView()
}