开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜