yannickl/YLProgressBar

When the progress is at 0, the label doesn't show up

Opened this issue · 3 comments

It looks like for some reason with a 0% label, it doesn't show up. But it would be nice to have it, as otherwise it looks like the bar is broken or something...

Thank you

Which indicatorTextDisplayMode are you using?

Have you tried with YLProgressBarIndicatorTextDisplayModeFixedRight or YLProgressBarIndicatorTextDisplayModeFixedLeft?

YLProgressBarIndicatorTextDisplayModeProgress

Haven't tried the others one, as having the text go with the progress looks the best. Isn´t it possible to have it behave as it is, but when it´s close to the left, just fix it so it's still seen?

Where should I check in the code to try and do it myself and maybe do a pull request?

Thanks!

An issue can occurred if the text color and the background's track have a low contrast ratio.

To avoid breaking the current behaviour you should create a new YLProgressBarIndicatorTextDisplayMode.

And then managing the display here and may be in the drawText:withRect: