Trying to add a full screen activity indicator in SwiftUI.
I can use .overlay(overlay: )
function in View
Protocol.
With this, I c
it's just a simple view.
ProgressView()
Currently, it's defaulted to CircularProgressViewStyle
but you can manually set the style of it by adding the following modifer:
.progressViewStyle(CircularProgressViewStyle())
Also, the style could be anything that conforms to ProgressViewStyle
UIActivityIndicator
in SwiftUI: (Exactly as a native View
):You can build and configure it (as much as you could in the original UIKit
):
ActivityIndicator(isAnimating: loading)
.configure { $0.color = .yellow } // Optional configurations (