2010-05-24 63 views
0

我试图创建一个UITabBarItem作为UIImage的最后几天。但我只得到一个白色的方块。我试图使用PNG 8,PNG 24,GIF和JPG。如果我将图像更改为更大的图像,白色方块也会更大,因此图像会很喜欢。UITabBarItem中的白色图像

这是我的代码:

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

感谢, 诺斯特拉

回答

1

现在,我得到了答案。

你需要使用带alpha通道的png。不管这意味着什么。我发现本教程创建一个: link text