Reputation: 14123
Please see this image:
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
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.
Upvotes: 2