UIProgressView updates in UITableView causes scrolling artefacts
I have noticed that when a table view cell contains a UIProgressView that is frequently updated, the scrolling behavior of the table view is affected significantly.
To be more precise, due to the frequent updates of the progress view the table view's position changes slightly while the table view's "rubber band" animation is animating. The same thing happens when the table view is pulled while at the top. It is tricky to explain, but I hope you get this gist.
Of course, updating the progress view on in the background is not possible due to how UIProgressView works behind the scenes. Is this a know issue? Is there a solution for this problem?
I am not sure if this problem can be solved without a workaround. The solution that I have found uses a timer and a progress cache. My guess is that Apple uses a similar approach.
The solution that I have come up with involves the creation of an object, an array or dictionary, that keeps track of the progress of each item displayed in the table view. Instead of updating each cell whenever the download progress changes for a table view cell, the view controller that manages the table view updates the visible table view cells at regular time intervals, which could be as frequent or infrequent as you'd like.
I think this is how Apple does it. The progress views in the downloads view of the Podcasts application, for example, updates at regular time intervals and doesn't progress smoothly, which supports my guess that Apple uses a timer to update the table view.