HtmlLabelPlugin
HtmlLabelPlugin copied to clipboard
Minimal supported iOS version?
What's the minimal supported iOS version? The HTML labels aren't showing in iOS 12 and iOS 13. Is this a bug in my app or is it indeed iOS 14 and higher?
Found a way to fix this. Turns out iOS 12 and 13 need to have TextColor set. If the code below is added to the app.xaml the labels will show.
<Style ApplyToDerivedTypes="True" TargetType="htmlLabel:HtmlLabel">
<Setter Property="TextColor" Value="Black" />
</Style>
BTW this can be tested with the tests that are included with the project. If HtmlLabel.Forms.Plugin.Tests.App.iOS is run on the simulator with iOS 12 or 13 only the red text will show up. After adding the style tag to app.xaml all labels will be visible.
Issue looks to be related to #126
@GuidoNeele thanks a lot! I will update the README! Why do you think it is related to 126?
Well the first line "I have a issue that both text and background color get white on a HtmlLabelPlugin when running an iPadOS app on M1 Mac." resembles the experience I had when running the test/sample application. Red text was showing but the other labels looked like white on white. Wasn't really white on white because the height was 0 but I can imagine you could perceive it that way if other labels with color do show. Would be helpful if @mikaelsundin could check if adding the piece of XAML works out for him. If it works out, it works out, if it doesn't then something else is going on.
I have tested today with adding this to app.xaml
<Style ApplyToDerivedTypes="True" TargetType="htmlLabel:HtmlLabel">
<Setter Property="TextColor" Value="Black" />
</Style>
The html label content is still white on white except links on Macbook Air M1.
As mentioned in a later comment in #126 check to see if your iOS device is in dark mode.