I have added an instance of UIToolbar and buttons on top of it . Each button's belongs to the class of UIBarButtonItem.
My Requirement is that each button has a customized layout , i dont want to use the native button styles provided by Apple. So i had 3 options in Interface Builder ( Plain , Bordered , Done ).
I have selected the style Plain and selected the image i want to add as backgroun under
Bar item -> Image.
But it didnt work for me, using the plain option gets me a little closer as border and done are nowhere closer but still it displays the images in white outline. Is there anyway that images on the buttons are added and they look exactly as they are. Its a pretty simple task while using UIButton. I just used Image option in the Attributes inspector for UIButton and select the image i want. But here while using UIBarButtonitem it doesnt work at all.
This is how it displays
Thanks
Taimur
Best Answer
Taimur,
I ran into the same problem that you're hitting. Our designer had specified a custom look for the buttons in our app's navigation bar. Here is a utility method that I wrote to generate the UIBarButtonItems that we needed, you should be able to modify it to your needs: