2009-11-09 358 views
2

我添加在Interface Builder用透明PNG(在导航栏的标志),但透明的像素似乎呈现为白色的形象图..PNG透明度

我在搜索PNG界面生成器,但没有运气。有小费吗?

回答

4

确保“不透明”复选框视图的“绘图”一节中的属性没有被选中,而背景具有0

1

在Interface Builder中的UIButton中选择图像后,需要告诉它使用背景为0不透明度(alpha)。

0

不透明,我与我的厦门国际银行只有某些按键有类似的问题。我还验证了所有按钮的png图标都是正确的。这里是按钮的XML是什么样子的的.xib:

<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="Tool_Selector" imagePosition="only" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="MHE-NL-kmV"> 
    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/> 
    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" /> 
    <font key="font" metaFont="smallSystem"/> 
</buttonCell> 

我确定了两种性质“changeBackground”和“changeGray”,这不存在对正确的按钮。一旦我删除了以下属性,它看起来是正确的:

changeBackground="YES" changeGray="YES"