Can't show the tabbar icon, even with size 30*30
I prepared some PNG icons, size 30*30, but with colors, not only black/white. The icons are OK when 开发者_StackOverflowI want to display them on buttons.
It can't be shown in the tabbar. I am wondering if the iphone only supports some simple icons (the black/white icons with lines).
Do you have any ideas?
Thanks in advance. Michael
TabBar icons displayed in gray scale even if they are color, and iPhone uses the alpha channel for masking.
I recommend checking this site, most iPhone developers like it :
http://www.glyphish.com/
The alpha component of the image is all that is used to draw the icon on the tab bar. So you need to make sure your image has a alpha channel or it will either not show up or show up as a blank square in the tab bar.
This does mean that effectively only monochrome images can be used in the tab bar.
I'm not at my mac right now and I can't remember if it is 1.0 alpha or 0.0 alpha that shows up as white in the tab bar, or if you need to have a black or white background, but if you create an image with varying transparency it should be easy enough to work out.
精彩评论