yannickl / YLProgressBar

UIProgressView replacement with an highly and fully customizable animated progress bar in pure Core Graphics
http://yannickloriot.com/library/ios/ylprogressbar/
MIT License
1.28k stars 186 forks source link

Wrong colour shown #45

Closed chungfk closed 8 years ago

chungfk commented 8 years ago

Hi, I've specified a particular colour for my progress bar but what is shown is different from what I specified.

Here is the screenshot:

screen shot 2016-08-12 at 4 31 29 pm

As seen in screenshot, the colour I wanted is selected under the properties which is light green (#8CE600) but wrong colour is shown in the xib file.

chungfk commented 8 years ago

i've tried setting it to 1.0 for the progress and the colour that i wanted is shown towards the end. I want the whole bar to be of one colour only.

yannickl commented 8 years ago

Hi,

Sorry for the late (I'm in holidays), but yes this is the normal behaviour. There is a gradiant that is auto applied to the color. For the moment to avoid it you'll need to use the progressTintColors instead of progressTintColor and set the same left and right color.

However now (after 4 years of existence) I think this is a wrong behaviour. To fix it without breaking the API I'm going to add a new property to have an uniform color.

yannickl commented 8 years ago

I added a uniformTintColor property. Just set it to YES and it should work as expected! :)