Classes

The following classes are available globally.

  • This differs from UITextView in only one way: the intrinsicContentSize’s height will never be UIViewNoIntrinsicMetric (-1). If [super intrinsicContentSize].height == -1, return the contentSize’s height.

    NOTE: UITextView is a subclass of UIScrollView. That’s why it has a contentSize.

    Declaration

    Objective-C

    @interface MDCIntrinsicHeightTextView : UITextView
  • Base class providing floating placeholder animation and other functionality.

    NOTE: This class is intended to be subclassed. It contains the logic for ‘automagic’ error states.

    The placeholder text is laid out inline. If floating is enabled, it will float above the field when there is content or the field is being edited. The character count is below text. The Material Design guidelines call this ‘Floating inline labels.’ https://material.io/go/design-text-fields#text-fields-labels

    Defaults:

    Active Color - Blue A700

    Border Fill Color - Clear Border Stroke Color - Clear

    Disabled Color = [UIColor lightGrayColor]

    Error Color - Red A400

    Floating Placeholder Color Active - Blue A700 Floating Placeholder Color Normal - Black, 54% opacity

    Inline Placeholder Color - Black, 54% opacity

    Leading Underline Label Text Color - Black, 54% opacity

    Normal Color - Black, 54% opacity

    Rounded Corners - None

    Trailing Underline Label Text Color - Black, 54% opacity

    Underline Height Active - 0p Underline Height Normal - 0p

    Underline View Mode - While editing

    See more

    Declaration

    Objective-C

    @interface MDCTextInputControllerBase
        : NSObject <MDCTextInputControllerFloatingPlaceholder>
  • Material Design compliant filled background text field from 2017.

    NOTE: All ‘automagic’ logic is inherited from MDCTextInputControllerBase.

    The background is filled, the corners are rounded, there’s no border, there is an underline, and the placeholder is centered vertically in the filled area.

    Defaults:

    Active Color - Blue A700

    Border Fill Color - Black, 6% opacity Border Stroke Color - Clear

    Disabled Color = [UIColor lightGrayColor]

    Error Color - Red A400

    Floating Placeholder Color Active - Blue A700 Floating Placeholder Color Normal - Black, 54% opacity

    Inline Placeholder Color - Black, 54% opacity

    Leading Underline Label Text Color - Black, 54% opacity

    Normal Color - Black, 54% opacity

    Rounded Corners - All

    Trailing Underline Label Text Color - Black, 54% opacity

    Underline Height Active - 2p Underline Height Normal - 1p

    Underline View Mode - While editing

    Declaration

    Objective-C

    @interface MDCTextInputControllerFilled : MDCTextInputControllerBase
  • Material Design compliant text field for full width applications like email forms. https://material.io/go/design-text-fields#text-fields-field-variations

    NOTE: This class does not inherit from MDCTextInputControllerBase. It does not have a floating placeholder.

    The placeholder is laid out inline and the character count is also inline to the trailing side.

    Defaults:

    Active Color - Blue A700

    Border Fill Color - Clear Border Stroke Color - Clear

    Disabled Color = [UIColor lightGrayColor]

    Error Color - Red A400

    Floating Placeholder Color Active - Blue A700 Floating Placeholder Color Normal - Black, 54% opacity

    Inline Placeholder Color - Black, 54% opacity

    Leading Underline Label Text Color - Black, 54% opacity

    Normal Color - Black, 54% opacity

    Rounded Corners - None

    Trailing Underline Label Text Color - Black, 54% opacity

    Underline Height Active - 0p Underline Height Normal - 0p

    Underline View Mode - While editing

    See more

    Declaration

    Objective-C

    @interface MDCTextInputControllerFullWidth : NSObject <MDCTextInputController>
  • Material Design compliant text field from 2016. The logic for ‘automagic’ error states changes: underline color, underline text color. https://www.google.com/design/spec/components/text-fields.html#text-fields-single-line-text-field

    The placeholder text is laid out inline. If floating is enabled, it will float above the field when there is content or the field is being edited. The character count is below text. The Material Design guidelines call this ‘Floating inline labels.’ https://material.io/go/design-text-fields#text-fields-labels

    NOTE: This design doesn’t exactly match the 2015 text fields that had slightly different colors.

    Defaults:

    Active Color - Blue A700

    Border Stroke Color - Clear Border Fill Color - Clear

    Disabled Color = [UIColor lightGrayColor]

    Error Color - Red A400

    Floating Placeholder Color Active - Blue A700 Floating Placeholder Color Normal - Black, 54% opacity

    Inline Placeholder Color - Black, 54% opacity

    Leading Underline Label Text Color - Black, 54% opacity

    Normal Color - Black, 54% opacity

    Rounded Corners - None

    Trailing Underline Label Text Color - Black, 54% opacity

    Underline Color Normal - Black, 54% opacity

    Underline Height Active - 2p Underline Height Normal - 1p

    Underline View Mode - While editing

    Declaration

    Objective-C

    @interface MDCTextInputControllerLegacyDefault : MDCTextInputControllerBase
  • Material Design compliant text field. The logic for ‘automagic’ error states changes: underline color, underline text color. https://www.google.com/design/spec/components/text-fields.html#text-fields-single-line-text-field

    The placeholder is laid out inline and the character count is also inline to the right.

    Defaults:

    Active Color - Blue A700

    Border Fill Color - Clear Border Stroke Color - Clear

    Disabled Color = [UIColor lightGrayColor]

    Error Color - Red A400

    Floating Placeholder Color Active - Blue A700 Floating Placeholder Color Normal - Black, 54% opacity

    Inline Placeholder Color - Black, 54% opacity

    Leading Underline Label Text Color - Black, 54% opacity

    Normal Color - Black, 54% opacity

    Rounded Corners - None

    Trailing Underline Label Text Color - Black, 54% opacity

    Underline Height Active - 0p Underline Height Normal - 0p

    Underline View Mode - While editing

    Declaration

    Objective-C

    @interface MDCTextInputControllerLegacyFullWidth
        : MDCTextInputControllerFullWidth
  • Material Design compliant text field with border and border-crossing, floating label from 2017. It is intended to be used on single-line text fields.

    The placeholder text is laid out inline. It will float above the field when there is content or the field is being edited. The character count is below text.

    The background is opaque, the corners are rounded, there is a border, there is an underline, and the placeholder crosses the border cutting out a space.

    Defaults:

    Active Color - Blue A700

    Border Stroke Color - Clear Border Fill Color - Clear

    Disabled Color = [UIColor lightGrayColor]

    Error Color - Red A400

    Floating Placeholder Color Active - Blue A700 Floating Placeholder Color Normal - Black, 54% opacity

    Inline Placeholder Color - Black, 54% opacity

    Leading Underline Label Text Color - Black, 54% opacity

    Normal Color - Black, 54% opacity

    Rounded Corners - All

    Trailing Underline Label Text Color - Black, 54% opacity

    Underline Color Normal - Black, 54% opacity

    Underline Height Active - 2p Underline Height Normal - 1p

    Underline View Mode - While editing

    Declaration

    Objective-C

    @interface MDCTextInputControllerOutlined : MDCTextInputControllerBase
  • Material Design compliant outlined background text field from 2017. The logic for ‘automagic’ error states changes: underline color, underline text color. https://www.google.com/design/spec/components/text-fields.html#text-fields-single-line-text-field

    The placeholder text is laid out inline. If floating is enabled, it will float to the top of the field when there is content or the field is being edited. The character count is below text. The Material Design guidelines call this ‘Floating inline labels.’ https://material.io/go/design-text-fields#text-fields-labels

    The background is clear, the corners are rounded, there’s a border, there is no underline, and the placeholder is centered vertically in the filled area but does NOT cross the border when floating.

    This design defaults to 5 lines minimum and does not expand on overflow by default.

    Defaults:

    Active Color - Blue A700

    Border Stroke Color - Clear Border Fill Color - Clear

    Disabled Color = [UIColor lightGrayColor]

    Error Color - Red A400

    Floating Placeholder Color Active - Blue A700 Floating Placeholder Color Normal - Black, 54% opacity

    Inline Placeholder Color - Black, 54% opacity

    Leading Underline Label Text Color - Black, 54% opacity

    Normal Color - Black, 54% opacity

    Rounded Corners - All

    Trailing Underline Label Text Color - Black, 54% opacity

    Underline Color Normal - Black, 54% opacity

    Underline Height Active - 2p Underline Height Normal - 1p

    Underline View Mode - While editing

    Declaration

    Objective-C

    @interface MDCTextInputControllerOutlinedTextArea : MDCTextInputControllerBase
  • A view that draws the underline effect for an instance of MDCTextInput. The underline has 2 possible states enabled and disabled. Disabled shows a dotted line instead of solid.

    See more

    Declaration

    Objective-C

    @interface MDCTextInputUnderlineView : UIView <NSCopying>