ios – ProgressView showing in all items of List

I have List with a button to download a file in each row. When I tap to download, the ProgressView is showing in all rows, instead of of just one row, like shown in the picture below.

enter image description here

Here is my code:

List {
    ForEach(0..<self.books.count, id: \.self) { index in
        VStack {
            let thisBook:Book = self.books [index]
            Text (
                .font(.system(size: 22))
            Button(NSLocalizedString("Download", comment: "")) {
                let downloadAudio = DownloadAudio()
                                             testamentId: Int32(self.testamentId), 
                                             forLanguage: self.item.language)
                { String, progress, error in
                    self.progress = progress
            ProgressView(value: self.progress, total: 1.0).id(UUID())

How do I fix this problem? Thanks in advance.

Latest articles


Related articles

Leave a reply

Please enter your comment!
Please enter your name here