physt
physt

Reputation: 31

Change MDCTextField Outlined text fields' active border color

my textfield

How do I change the colour of MDCTextField's outline from purple to .systemBlue?

Upvotes: 3

Views: 3056

Answers (2)

Behnam Rakhshani
Behnam Rakhshani

Reputation: 563

this is a solution and work for me

let textField = MDCOutlinedTextField(frame: .zero)

textField.setOutlineColor( .black, for: .editing)
textField.setOutlineColor( .red , for: .disabled)
textField.setOutlineColor( .red , for: .normal)

Upvotes: 4

Sergej G.
Sergej G.

Reputation: 11

Have you already tried?

let controller = MDCTextInputControllerOutlined(textInput: textInput)
controller.borderStrokeColor = .black

Upvotes: 1

Related Questions