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

Remove gradiant #33

Closed chlebta closed 8 years ago

chlebta commented 9 years ago

Hello, How to remove gradient from flatProgress bar simple bar without black gradient at the begin

yannickl commented 9 years ago

Hi,

I don't understand your problem, please can you share an image (screenshot or whatever) to help me visualize it?

Best

chlebta commented 9 years ago

@yannickl , check this : one two

as you can see there's like black gradient there and her's my code :

 //progress bar
    _progressBar = [[YLProgressBar alloc] initWithFrame:CGRectMake(0.f, 10.f, self.view.frame.size.width, 50.f)];
    _progressBar.type = YLProgressBarTypeFlat;
    _progressBar.progressTintColor = secondaryColor;
    _progressBar.hideStripes = YES;
    [self.view addSubview:_progressBar];
yannickl commented 9 years ago

Ok, I understand,

The progressTintColor property automatically add the gradient. You should use the progressTintColors instead:

_progressBar.progressTintColors = @[secondaryColor];
nightwolf-chen commented 8 years ago

This is confusing. I think the ProgressTintColor property should not include auto gradient function. It takes me sometime to find out how to disable the gradient, thanks anyway!

yannickl commented 8 years ago

@nightwolf-chen With the latest version you can use the uniformTintColor property instead #45