有人可以给出一个例子,在image.xcasset中通过选项Render:"as template“在Xcode上使用矢量图像(.pdf)?我可以编程设置矢量图像的颜色吗?如果是,是如何实现的?
谢谢,奥马尔。
发布于 2014-11-18 15:54:32
可以,停那儿吧。当使用"as template“时,系统会忽略图像的颜色信息,并根据图像中的alpha值创建一个图像模板(alpha值小于1.0的图像部分将被视为完全透明)。然后可以使用tintColor对此模板重新着色,以匹配用户界面的其余部分。
参见Apple documentation about template images in UIKitUICatalog。
https://stackoverflow.com/questions/26731971
复制相似问题