Is it possible to modify a UIImage
's renderingMode
from a storyboard or xib editor?
The goal is to apply tintColor
to the particular UIImageView
object.
You can set the image rendering mode not in the .xib
file, but in an .xcassets
library.
After adding an image to an asset library, select the image and open the attributes inspector on the right side of Xcode. Find the attribute 'Render As' and set it to 'template'.
After setting an image's rendering mode, you can add a tint color to the UIImageView
in a .xib
or .storyboard
file to adjust the image color.
This sets the property on the image wherever it's used rather than just in one interface builder file, but in almost all cases (that I've encountered) this is the behavior you want.
A few things to note:
UIImageView
. I have not looked into that deeply.UIKitComponents
such as images in UIButton
's and UIBarButtonItem
's.