You can theme a text field to match the Material Design style by importing a theming extension. The content below assumes you have read the article on Theming.
First, import the text field theming extension and create a text field.
import MaterialComponents.MaterialTextControls_OutlinedTextFieldsTheming let textField = MDCOutlinedTextField()
#import <MaterialComponents/MaterialTextControls+FilledTextFieldsTheming.h> MDCFilledTextField *filledTextField = [[MDCFilledTextField alloc] init];
Then pass a container scheme to one of the theming methods on the theming extension.
filledTextField.applyTheme(withScheme: containerScheme)
[self.filledTextField applyThemeWithScheme:self.containerScheme];