– ganime Nov 30 '12 at | I think you're taking the wrong approach by reloading the table cell every time the delegate method gets called.
You can instead just grab the visible cell and update the progress indicator directly, rather than going through the data source.
I'm assuming you have some way of converting You should be aware, though, that this solution won't suffice if you have more downloads than visible cells -- you should also be storing the progress of each download somewhere in your data source so that if the table view DOES need to reload a cell (due to a scroll), it knows how to set the progress indicator.
| this answer edited Nov 30 '12 at answered Nov 30 '12 at Joe Hankin 861 8 14 At last have found a solution (See my own answer).
I use a custom cell object so that I can determine which cell has my downloading object, and search through them to find it.
While theimage is downloading, a UIProgress View should be displayed in the corresponding table row.
The cell that used to be at row zero gets reused in row 12 when you scroll.
So, the cell object that was used to initiate the download is not in the same place.
progress = 0.114286 expected = 35 received = 4 actual = 0.000000 progress = 0.285714 expected = 35 received = 6 actual = 0.114286 progress = 0.571429 expected = 35 received = 10 actual = 0.285714 progress = 0.857143 expected = 35 received = 10 actual = 0.571429 progress = 1.000000 expected = 35 received = 10 actual = 0.857143 // this is the last output This suggests that the progress is being incremented even when the files already received value is not and I don't understand why.
I've a feeling I've missed something obvious but would appreciate it if anyone can point out what I'm doing wrong? Recommend：iphone - i OS - UIProgress View only updating onced.
My guess is if you've got the index path and the download info available in the notification handler, you should be updating the progress view there, rather than reloading the table view every time.