Unable to change UI of MDCTextField i

492 Views Asked by At

I am trying to use the MDCTextField with MDCTextInputControllerOutlined of MaterialComponents in my swift project but I facing a major challenge with design adjustments in it. It's not allowing me to change even the height of the textfield as well to centre the text input part. Not even the fonts of placeholder is changing. Tried following all possible options provided in sdk.

        tptf.placeholder = "Name"
        tptf.placeholderLabel.textColor = UIColor.green
        tptf.placeholderLabel.font = UIFont(name: "TimesNewRoman", size: 14)
        tptf.textColor = UIColor.green
        tptf.font = UIFont(name: "TimesNewRoman", size: 14)
        tptf.clearButtonMode = .unlessEditing
        tptf.delegate = self
        
        self.textController = MDCTextInputControllerOutlined(textInput: tptf)
        self.textController.textInsets(UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10))
        self.textController.activeColor = UIColor.green
        self.textController.floatingPlaceholderActiveColor = UIColor.green

PFA imageenter image description here

0

There are 0 best solutions below