White image in UITabBarItem
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
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
精彩评论