I have come across the UIImage
property UIImageRenderingMode
which is introduced in iOS 7. But I don't get the differences among different UIImageRenderingMode
s that are UIImageRenderingModeAutomatic
, UIImageRenderingModeAlwaysOriginal
and UIImageRenderingModeAlwaysTemplate
.
I want to know the basic meaning of them and when/how to use them.
I found a tutorial which explains UIImageRenderingMode
with example.
From tutorial :
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With