views:

262

answers:

1

Hi,

the last days I tried to create an UITabBarItem as UIImage. But I only get a white square. I tried to use a png 8, png 24, gif and jpg. The image will be fond becaus if I change the image to a bigger one the white square also will be bigger.

This is my Code:

    UIBarButtonItem *selectFeed_3 = [[UIBarButtonItem alloc] 
                                 initWithImage:[UIImage imageNamed:@"icon_20.png"]
                                 style:UIBarButtonItemStyleBordered 
                                 target:self 
                                 action:@selector(changeFeed_3)
                                 ];

Thanks, Nostra

A: 

Now I got the answer.

You need to use an png with alpha channel. Whatever this means. I found this tutorial to create one: link text

Andreas Prang