Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Stateless/Valueless Progress Bar?

I'm looking to get a stateless/valueless UIProgressView or other kind of progress bar in iOS:

enter image description here

I've tried looking up some documentation but couldn't find anything relevant to my issue.
If any of you have any recommendations i'd love to hear those :)

Thanks!
Shai.

like image 782
Shai Mishali Avatar asked Jun 13 '26 22:06

Shai Mishali


2 Answers

iOS's UIProgressView is designed specifically for that situation in which you know with certainty the percentage completed of your task. It only provides a 'fill-in' style presentation. You will not be able to use it for merely indicating an ongoing activity.

Ideas: use UIImageView's capacity for animating through an array of images. You could create just a few (three or four) variants on what I will call the 'barbershop pole' progress image and use those. Or... just take that animated gif you posted and put it in your UIImageView. It will work fine. If you want to stop animating it... just do something like

[myImageView setImage:stoppedImage];

If you really want to get fancy, you could write some subclass to do everything you want. But who has the time? Keep it simple!

Another thought

Why didn't I just suggest that you use the animated gif you posted above in your image view? It will work. And be rather easy.

like image 60
QED Avatar answered Jun 15 '26 11:06

QED


I just finished a UIProgressView subclass that's super easy to use (if progress == 0 activate barber pole effect). Hope this helps!

WNProgressView

like image 45
n8chur Avatar answered Jun 15 '26 11:06

n8chur