I have a progress bar that should update after every step. the steps can be very high, let's say 50.000. When inputting this large number, the progress bar doesn't do anything when the iPhone is calculating. When the iPhone is done, the progress bar is instantly at 1.0 (max) progress. This is my code:
for x in 1...timesToSimulate{
var progress: Float = Float(x) / Float(timesToStimulate)
progressBarView.setProgress(progress, animated: true)
}
The calculation isn't that hard, but I am doing something wrong but can not see what. You know what it is?