Search code examples
iosswiftswiftui

How to change ProgressView accentColor in SwiftUI?


This doesn't apply

ProgressView("\(spinnerLabel)")
    .accentColor(.white)

This changes the label

.foregroundColor(.white)

enter image description here


Solution

  • Try the following:

    For iOS15+

    .tint(.white)
    

    For iOS13+

    .progressViewStyle(CircularProgressViewStyle(tint: Color.white))