I have a UIImageView in my app that displays a static image. The image is set as always template in the asset manager. Here is the inspector when capturing the interface during run-time:
It seems that the tintColor is being set, but it's not being applied (or something??). Here is the accessibility information from the same panel as above:
I attempted to fix it using this question, but it does not change the appearance. Here's the code I'm using (nested in layoutSubview):
// mode is always set to `.alwaysTemplate` and the below branch
// never executes.
let mode = promptImageView?.image?.renderingMode
if mode != .alwaysTemplate {
if let image = promptImageView?.image {
let newImage = image.withRenderingMode(.alwaysTemplate)
promptImageView!.image = newImage
}
}