Material-components-ios: [MDCTextInputControllerOutlined] default border color

Created on 6 Jul 2019  路  4Comments  路  Source: material-components/material-components-ios

Any idea what is the default border color for MDCTextInputControllerOutlined and where it is defined?
image
I want to use this similar color for custom UITextField.

[TextFields] Question

Most helpful comment

You can configure the placeholder color for Outlined text fields using 3 properties. Each property controls the placeholder text color in a different state:

|State|Property|Example|
|---|---|---|
|textField.text == nil
textField.isFirstResponder == NO |inlinePlaceholderColor|controller.inlinePlaceholderColor = UIColor.purpleColor;
placeholder-inline|
|textField.text != nil
textField.isFirstResponder == NO|floatingPlaceholderNormalColor|controller.floatingPlaceholderNormalColor = UIColor.redColor;
placeholder-floating-normal|
|textField.isFirstResponder = YES|floatingPlaceholderActiveColor|controller.floatingPlaceholderActiveColor = UIColor.brownColor;`
placeholder-floating-active|

All 4 comments

The title doesn't have a [Component] prefix.

Thanks @romoore for your reply. Can you please tell me how to change the default black text color in above image when the field is not in focus?

You can configure the placeholder color for Outlined text fields using 3 properties. Each property controls the placeholder text color in a different state:

|State|Property|Example|
|---|---|---|
|textField.text == nil
textField.isFirstResponder == NO |inlinePlaceholderColor|controller.inlinePlaceholderColor = UIColor.purpleColor;
placeholder-inline|
|textField.text != nil
textField.isFirstResponder == NO|floatingPlaceholderNormalColor|controller.floatingPlaceholderNormalColor = UIColor.redColor;
placeholder-floating-normal|
|textField.isFirstResponder = YES|floatingPlaceholderActiveColor|controller.floatingPlaceholderActiveColor = UIColor.brownColor;`
placeholder-floating-active|

Was this page helpful?
0 / 5 - 0 ratings

Related issues

romoore picture romoore  路  5Comments

croccio picture croccio  路  3Comments

appsforartists picture appsforartists  路  5Comments

Morpheu5 picture Morpheu5  路  7Comments

guillermolechuga picture guillermolechuga  路  3Comments