I have a MDCTextField in a nib file with an outlet to my view controller. In the view controller I add this text field to a MDCTextInputControllerDefault. If I set the helperText or the errorText via the controller methods the text appears overlaid on top of input.
Am I missing something?
40.1.1
iOS 11.2
@steviemo , is this still the case?
I'm experiencing a similar problem described here.
In my case the MDCTextFields reside in a UIScrollView. First I constrained these TextFields with a fixed height, but that resulted in the leadingUnderlineLabel's text being shown on top of the actual TextField.
Removing this fixed height resolved the issue. However the view takes more space than it initially needs, when there is no text in the leadingUnderlineLabel.
Could you verify that you also gave the nib's a fixed height? Or have you come up with a different solution for this matter?
Also, when the text in the leadingUnderlineLabel (I use it for displaying an error message) is quite large it should be displayed in two (or more) lines. Setting the numberOfLines on the leadingUnderlineLabel does not solve this problem. (B.t.w. I'm using MDCTextInputControllerUnderline)
@Raoulnl the underline labels do not support more than one line right now.
I鈥檓 going to close this ticket since I haven鈥檛 heard back from OP. Reopen if you continue to experience an issue.
I have the same issue here. How do I set several lines of helper text?
+1
If you're looking for a good alternative, have a look at this repo by Steph Sharp.
There is a tracking issue to add multi-line support for helper and error text to Filled and Outlined controllers, but not the Default controller.
Most helpful comment
If you're looking for a good alternative, have a look at this repo by Steph Sharp.