Avatar ·

How to add an Activity Indicator in SwiftUI

Hi! I've just started learning SwiftUI and ran into a problem. I need to show the user that data is loading — for example, when the app fetches information from the network. In UIKit I used UIActivityIndicatorView, but I don't see such a component in SwiftUI. I tried adding a simple Text("Loading..."), but it looks unprofessional. I want a standard spinning indicator like in iOS. Here's an example of my code that loads a list of users: ```swift struct ContentView: View { @State private var users: [User] = [] @State private var isLoading = true var body: some View { NavigationView { List(users) { user in Text(user.name) } .navigationTitle("Users") } ```