YLProgressBar icon indicating copy to clipboard operation
YLProgressBar copied to clipboard

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

Open jlubeck opened this issue 9 years ago • 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

jlubeck avatar Nov 21 '16 02:11 jlubeck

Which indicatorTextDisplayMode are you using?

Have you tried with YLProgressBarIndicatorTextDisplayModeFixedRight or YLProgressBarIndicatorTextDisplayModeFixedLeft?

yannickl avatar Nov 24 '16 21:11 yannickl

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!

jlubeck avatar Nov 24 '16 21:11 jlubeck

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:

yannickl avatar Nov 24 '16 22:11 yannickl