Is there any way to divide a progress bar into segments using swift? (as shown in the picture)

810 Views Asked by At

Example of segmented progress bar:

enter image description here

  • Is there some way to duplicate this progress bar using swift.
2

There are 2 best solutions below

0
On

I don't think you could do this with a UIProgressBar but it would be trivial to create your own control that had a Float value property that ranged from 0 to 1 and drew a colored bar based on the value.

1
On

Good afternoon I had exactly the same question, I solved it by creating several identical vii

I created for example 7 different views with indents from each other, that's what happenedenter image description here