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

How to blink a button iOS swift?

iOS flutter while run to iPhone it had the error - Cannot find type 'PhoneNumberKit' in scope