I have been trying to get my progress view to update, but most of the questions have been about using progress view as a timer. Instead, I am running a for loop a couple thousand times and it takes a little why. I want the use to know how far along the method is, so I've implemented a progress view like this (there is a bunch of other stuff in the for loop but I don't think it is necessary to answer my question):
for i in 0..<2429 {
var progress = Double(i) / Double(2430)
print(progress)
seasonProgress.setProgress(Float(progress), animated: false)
seasonProgress.reloadInputViews()
}
When I print progress
is it updating with every loop, but the progress view (name seasonProgress
) only updates after the for loop is complete. How do I get it to upload while the for loop is going? Thanks in advance!!!