Nitish
Nitish

Reputation: 14123

How to fill color exactly like this image color?

Please see this image:

enter image description here

I need to fill the same color with same effect in a bar. I tried to use

[UIColor colorWithPatternImage:[UIImage imageNamed:@"bar.png"]];  

But didn't get success. It created the same effect but with patterns.

Upvotes: 0

Views: 250

Answers (1)

Paul Cezanne
Paul Cezanne

Reputation: 8741

Use a 1 pixel wide image, not the 100 pixel wide one that you have. The 20th and 21st vertical columns in your image are different from the rest, hence the pattern. Check out the zoomed in version below.

enter image description here

Upvotes: 2

Related Questions