TruMan1 TruMan1 -5 years ago 263
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).

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download