0

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.

Mehrdad
  • 1,050
  • 1
  • 16
  • 27

2 Answers2

2

Changing the font size changes the height!

Mehrdad
  • 1,050
  • 1
  • 16
  • 27
0

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)
willhess
  • 1,334
  • 13
  • 14