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)

Aberta

#4.816 aberto em 18 de dez. de 2018

 (1 comentário) (0 reação) (0 responsável)C# (1.926 forks)batch import
a/customrenderere/3 :clock3:help wantedinactivep/iOS 🍎t/bug :bug:up-for-grabs

Métricas do repositório

Stars
 (5.644 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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.

Guia do colaborador