0

I have a progress view and can't seem to set it's progress lower than 0.15. If I do, it still appears as it's progress is at 0.15. After the progress grows beyond this value, everything works OK.

The view inspector shows the two image views for the tracking and progress tint colors, but from the start (when progress should be 0), the one for the tracking color has a width of 66 and it can't seem to go lower than this. I saw an earlier post (from 2013) that said to just use a UISlider instead. This doesn't seem to be an elegant solution.

Does anybody have any suggestions on how to fix this?

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
user426132
  • 1,341
  • 4
  • 13
  • 28
  • 1
    What is the width of your `UIProgressView`? I don't have any issues with incrementing the progress bar from 0.0 by 0.01 increments. – DonMag Feb 27 '18 at 13:39
  • It's the width of the entire screen... – user426132 Feb 27 '18 at 13:41
  • OK - and what is that width (screens have different sizes)? – DonMag Feb 27 '18 at 13:42
  • What width? the 66 one? That's for the tracking tint color imageview used internally by the progressView .. – user426132 Feb 27 '18 at 13:47
  • When your "tracking color image" width is 66 --- ***what is the width of the progress bar itself?*** – DonMag Feb 27 '18 at 13:50
  • 1
    I'm assuming you are using Swift, so try running this in a Playground page - it starts the ProgressView at 0.0 and increments the .progress by 0.01 on each button tap: https://gist.github.com/DonMag/75ef8250a03305d695c353ce15e32f08 – DonMag Feb 27 '18 at 13:57
  • I updated that gist to show a `UIProgressView` with a width of `100`, so each button tap will increase the `.progress` value by `1`. The first 4 taps will result in a "progress tint width" of 4, after which it will expand by only 1-pt each time. In other words, setting `.progress` to 0.07 results in a tint-width of 7... https://gist.github.com/DonMag/75ef8250a03305d695c353ce15e32f08 – DonMag Feb 27 '18 at 14:13

0 Answers0