Use ActivityIndicatorView in SwiftUI
masterTo create a loading indicator, initialize ActivityIndicatorView with a specific type from the ActivityIndicatorView.IndicatorType enum. You can customize the appearance using standard SwiftUI modifiers like .frame() and .foregroundColor().
// Basic usage
ActivityIndicatorView(type: .default)
// Customized usage
ActivityIndicatorView(type: .default)
.frame(width: 50.0, height: 50.0)
.foregroundColor(.red)
// Usage with specific parameters
ActivityIndicatorView(type: .growingArc(.red, lineWidth: 4))
.frame(width: 50.0, height: 50.0)