我已经遇到了在iOS 7中引入的UI
Image属性UI
ImageRenderingMode.但是我没有得到UIImageRenderingModeAutomatic,UIImageRenderingModeAlwaysOriginal和UIImageRenderingModeAlwaysTemplate的不同UIImageRenderingMode之间的差异.
我想知道他们的基本含义,何时/如何使用它们.
解决方法
我发现一个
tutorial说明了UIImageRenderingMode的例子.
从教程:
UIImageRenderingModeAlwaysTemplate mode will replace all non-transparent colors on
a UIImage with the tint color. The entire background and any portion of the image
that you do not wish to render using the tint color must be completely transparent.UIImageRenderingModeAlwaysOriginal. When this is applied the tint color is never
applied to the image so the original color is always used when rendering the
image.UIImageRenderingModeAutomatic automatically decides which rendering mode to use based on where the image is being displayed. This is the default value for images.