TruMan1 TruMan1 - 8 months ago 121
Swift Question

Infinite step for progress view?

I need to provide a status on the screen for the user while an arbitrary process is happening. I have no way of knowing how long it will take. How can I increment the

forever (it will slow down as it approaches 1).


One possible solution is to increment it half the distance to the end. So the first time the progressview is at 0, you take 1 minus how far it has gone (0) and divide that by 2. So (1-0)/2 = .5. The next time would be (1-.5)/2 = .25 so you would add .25 and get .75 This will work although probably is not the desirable solution as the first time it will go quite quickly and users will assume the task is halfway done when really the first part is done and the progress view will slow down considerably