You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using <img named="SomeImage"> with a UILabel, I expect the image to render exactly as it would in a browser.
Actual Result
The image will render as a black&white image but tinted to the UILabel's color. In some cases it will just display the UIImage as solid white or solid black. There is some kind of interaction between the UILabel text color and the UIImage rendering.
Steps to Reproduce
Download the Google Image https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png
Create a UILabel with a text color of black.
Use SwiftRichString to add a named image using the Google image.
Notice the Google letters will all render solid black.
Change the UILabel color to red and notice the image now renders solid red letters.
The text was updated successfully, but these errors were encountered:
Due to a bug in UIKit when allocating NSTextAttachment it seems ignoring the rendering mode of UIImage instances and apply a template color (the text color of the remaining part of the text).
Now I've introduced a fix which fixes it and render then image correctly when you set the original mode.
Thanks for reporting it. I'll include it into the next update I plan to release in a very few days.
Expected Result
When using
<img named="SomeImage">
with a UILabel, I expect the image to render exactly as it would in a browser.Actual Result
The image will render as a black&white image but tinted to the UILabel's color. In some cases it will just display the UIImage as solid white or solid black. There is some kind of interaction between the UILabel text color and the UIImage rendering.
Steps to Reproduce
https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png
The text was updated successfully, but these errors were encountered: