xamarin/Xamarin.Forms

Text of UITextView is not displayed in the view, when default text color of the Editor is converted to UIColor and set to UITextColor in Xamarin Forms (iOS)

Aperta

#4816 aperta il 18 dic 2018

 (1 commento) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/customrenderere/3 :clock3:help wantedinactivep/iOS 🍎t/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

Text of UITextView is not displayed in the view, when default text color of the Editor is converted to UIColor and set to UITextView in Xamarin Forms (iOS). Kindly find the sample below,

Sample: EditorRenderer_Issue.zip

In my sample, I have added UITextView (Renderer of Editor) as custom renderer for Xamarin Forms Grid layout. When I set text color to the UITextView form editor default text color, Text of UITextView is not displayed in the view. I suspect that issue is due to Alpha value is 0 when default color of the Editor's text color is converted to UIColor. When I set Editor text color as Black, it works fine and I get Alpha value as 255. Kindly find the out image below,

Screenshots

editorrenderer

editorrenderer_output_2

Steps to Reproduce

  1. Run the sample.
  2. Enter the Text in the editor

Issue

Text is not displayed.

Expected Behavior

Text in black color should be displayed.

Guida contributor