How to change MDCFilledTextField/MDCOutlinedTextField height?

1.4k Views Asked by At

Size of MDCFilledTextField/MDCOutlinedTextField is not changeable and it's fixed. Any idea to change Material TextFields height?

FYI: I tested some ways like putting the textField in a view ...et cetera. non of them works.

2

There are 2 best solutions below

0
Mehrdad On BEST ANSWER

Changing the font size changes the height!

0
willhess On

According to the Material 2 Docs the MDCOutlinedTextField or MDCFilledTextArea size can be adjusted by passing in custom frame dimensions:

let estimatedFrame = CGRect(x: 0, y: 0, width: CUSTOM_WIDTH, height: CUSTOM_HEIGHT)
let textField = MDCOutlinedTextField(frame: estimatedFrame)