MDCFilledTextField with white background color iOS swift

 Problem:

I want to create the textfield with MDCFilledTextField then want to fill the textfield bgcolor as white color.How to achieve that?

Solution:

    @IBOutlet weak var myTextField: MDCFilledTextField!


        myTextField.setFilledBackgroundColor(.white, for: .normal)

        myTextField.setFilledBackgroundColor(.white, for: .editing)


The above solution will works for both normal and editing state.

If you set only in normal state then while editing it will not works.


Comments

Popular posts from this blog

store cgpoint in userdefaults iOS swift

Invalid bundle error while upload the app to the app Store