0

I'm trying to put a UIBarButtonItem with a custom image on a UINavigationBar. When I do however, the image doesn't look right. I want the button on the navigation bar to look like the one below it.

screenshot

(This is a screenshot from the simulator, by the way, not Interface Builder)

I created the custom UIBarButtonItem by creating a UIButton, using the cog-wheel image as a background, and then simply dragging it to the the right bar button item place in Interface Builder. Seeing as creating a UIBarButtonItem programmatically with the aforementioned UIButton as its 'custom view' (-initWithCustomView) has the same result, I believe this is what is happening as well.

What I don't understand is why the button image lost its nice edges and color gradient when I added it to the navigation bar wrapped in a bar button item. Can anyone tell me?

Thanks in advance.

pancake
  • 1,923
  • 2
  • 21
  • 42

1 Answers1

4

The image hasn't changed. It is the same. Its just that when put on different backgrounds, it is showing differently. You should consider increasing the contrast.

Deepak Danduprolu
  • 44,595
  • 12
  • 101
  • 105
  • You're right, took me a while to see that. Do you mean by 'changing the contrast' that I edit the image? Or are you referring to a setting available in interface builder? – pancake May 22 '11 at 20:30
  • Edit the image. Change the gradient behind and make it lighter on the top. – Deepak Danduprolu May 22 '11 at 20:33