Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface MDCChipCollectionViewCell : UICollectionViewCell
    
    /*
     The chip view.
    
     The chip's bounds will be set to fill the collection view cell.
     */
    @property(nonatomic, nonnull, strong, readonly) MDCChipView *chipView;
    
    /*
     Animates the chip view every time the bounds change. Defaults to NO.
    
     Set this to YES to animate chip view when it resizes. If the chip view changes size upon selection
     this should be set to YES.
     */
    @property(nonatomic, assign) BOOL alwaysAnimateResize;
    
    /*
     Creates an MDCChipView for use in the collection view cell.
    
     Override this method to return a custom MDCChipView subclass.
     */
    - (nonnull MDCChipView *)createChipView;
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface MDCChipField : UIView
    
    /**
     The text field used to enter new chips.
    
     Do not set the delegate or positioningDelegate.
    
     If you set a custom font, make sure to also set the custom font on textField.placeholderLabel and
     on your MDCChipView instances.
     */
    @property(nonatomic, nonnull, readonly) MDCTextField *textField;
    
    /**
     The fixed height of all chip views.
    
     Default is 32dp.
     */
    @property(nonatomic, assign) CGFloat chipHeight;
    
    /**
     Attribute to determine whether to show the placeholder text (if it exists) when chips are
     present.
    
     Default is YES.
     */
    @property(nonatomic, assign) BOOL showPlaceholderWithChips;
    
    /**
     Enabling this property allows chips to be deleted by tapping on them.
    
     @note This does not support the 48x48 touch targets that Google recommends. We recommend if this
     behavior is enabled that a snackbar or dialog are used as well to allow the user to confirm if they
     want to delete the chip.
     */
    @property(nonatomic) BOOL showChipsDeleteButton;
    
    /**
     The delimiter used to create chips in the text field. Uses default value
     MDCChipFieldDelimiterDefault if no delimiter is set.
     */
    @property(nonatomic, assign) MDCChipFieldDelimiter delimiter;
    
    /**
     The minimum width of the text field.
    
     Default is |kMDCChipFieldDefaultMinTextFieldWidth|.
     */
    @property(nonatomic, assign) CGFloat minTextFieldWidth;
    
    /**
     The chips that are visible in the input area.
     */
    @property(nonatomic, nonnull, copy) NSArray<MDCChipView *> *chips;
    
    /**
     Delegate to receive updates to the chip field view. Implement
     |chipFieldHeightDidChange| to receive updates when the height of the chip field changes.
     */
    @property(nonatomic, nullable, weak) id<MDCChipFieldDelegate> delegate;
    
    /**
     The inset or outset margins for the rectangle surrounding all of the chip field's content.
     Default is |kMDCChipFieldDefaultContentEdgeInsets|.
     */
    @property(nonatomic, assign) UIEdgeInsets contentEdgeInsets;
    
    /**
     Adds a chip to the chip field.
    
     @param chip The chip to add to the field.
    
     Note: Implementing |chipField:shouldAddChip| only affects whether user interface input entered into
     the text field is changed into chips and will not affect use of this method.
     */
    - (void)addChip:(nonnull MDCChipView *)chip;
    
    /**
     Removes a chip from the chip field.
    
     @param chip The chip to remove from the field.
     */
    - (void)removeChip:(nonnull MDCChipView *)chip;
    
    /** Removes all selected chips from the chip field. */
    - (void)removeSelectedChips;
    
    /** Removes all text from the chip field text input area. */
    - (void)clearTextInput;
    
    /** Selects a chip in a chip field. */
    - (void)selectChip:(nonnull MDCChipView *)chip;
    
    /** Deselects all chips in a chip field. */
    - (void)deselectAllChips;
    
    /** Sets the VoiceOver focus on the text field. */
    - (void)focusTextFieldForAccessibility;
    
    @end
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface MDCChipView : UIControl <MDCElevatable, MDCElevationOverriding>
    
    /*
     A UIImageView that leads the title label.
     */
    @property(nonatomic, readonly, nonnull) IBInspectable UIImageView *imageView;
    
    /*
     A UIImageView that leads the title label. Appears in front of the imageView. Only visible when the
     chip is selected.
    
     This image view is typically used to show some icon that denotes the chip as selected, such as a
     check mark. If imageView has no image then the chip will require resizing when selected or
     deselected to account for the changing visibility of selectedImageView.
     */
    @property(nonatomic, readonly, nonnull) IBInspectable UIImageView *selectedImageView;
    
    /*
     A UIView that trails the title label.
    
     It will be given a size based on the value returned from sizeThatFits:.
     */
    @property(nonatomic, strong, nullable) IBInspectable UIView *accessoryView;
    
    /*
     The title label.
    
     @note The title color is controlled by setTitleColor:forState:.
     @note The title font is controlled by setTitleFont.
     */
    @property(nonatomic, readonly, nonnull) IBInspectable UILabel *titleLabel;
    
    /*
     Padding around the chip content. Each subview can be further padded with their invidual padding
     property.
    
     The chip uses this property to determine intrinsicContentSize and sizeThatFits.
    
     Defaults to (4, 4, 4, 4).
     */
    @property(nonatomic, assign) UIEdgeInsets contentPadding UI_APPEARANCE_SELECTOR;
    
    /*
     Padding around the image view. Only used if the image view has a non-nil image.
    
     The chip uses this property to determine intrinsicContentSize and sizeThatFits.
    
     Defaults to (0, 0, 0, 0).
     */
    @property(nonatomic, assign) UIEdgeInsets imagePadding UI_APPEARANCE_SELECTOR;
    
    /*
     Padding around the accessory view. Only used if the accessory view is non-nil.
    
     The chip uses this property to determine intrinsicContentSize and sizeThatFits.
    
     Defaults to (0, 0, 0, 0).
     */
    @property(nonatomic, assign) UIEdgeInsets accessoryPadding UI_APPEARANCE_SELECTOR;
    
    /*
     Padding around the title.
    
     The chip uses this property to determine intrinsicContentSize and sizeThatFits.
    
     Defaults to (3, 8, 4, 8). The top padding is shorter so the default height of a chip is 32 pts.
     */
    @property(nonatomic, assign) UIEdgeInsets titlePadding UI_APPEARANCE_SELECTOR;
    
    /*
     Font used to render the title.
    
     If nil, the chip will use the system font.
     */
    @property(nonatomic, strong, nullable) UIFont *titleFont UI_APPEARANCE_SELECTOR;
    
    /*
     This property determines if an @c MDCChipView should use the @c MDCRippleView behavior or not.
     By setting this property to @c YES, @c MDCStatefulRippleView is used to provide the user visual
     touch feedback, instead of the legacy @c MDCInkView.
     @note Defaults to @c NO.
     */
    @property(nonatomic, assign) BOOL enableRippleBehavior;
    
    /**
     Enabling the selection of the Chip on tap (when RippleBehavior is enabled).
     When rippleAllowsSelection is enabled, tapping a chip automatically toggles the chip's selected
     state (after a short ripple animation). When disabled, tapping a chip creates a momentary ripple
     animation while the chip remains unselected.
    
     @note: This property is ignored when RippleBehavior is disabled.
    
     Defaults to: Yes.
     */
    @property(nonatomic) BOOL rippleAllowsSelection;
    
    /*
     The color of the ink ripple.
     */
    @property(nonatomic, strong, null_resettable)
        UIColor *inkColor UI_APPEARANCE_SELECTOR __deprecated_msg("Use setInkColor:forState:");
    
    /*
     The shape generator used to define the chip's shape.
     */
    @property(nullable, nonatomic, strong) id<MDCShapeGenerating> shapeGenerator UI_APPEARANCE_SELECTOR;
    
    /*
     Indicates whether the chip should automatically update its font when the device’s
     UIContentSizeCategory is changed.
    
     This property is modeled after the adjustsFontForContentSizeCategory property in the
     UIContentSizeCategoryAdjusting protocol added by Apple in iOS 10.0.
    
     If set to YES, this button will base its text font on MDCFontTextStyleButton.
    
     Default value is NO.
     */
    @property(nonatomic, readwrite, setter=mdc_setAdjustsFontForContentSizeCategory:)
        BOOL mdc_adjustsFontForContentSizeCategory UI_APPEARANCE_SELECTOR;
    
    /**
     Enable legacy font scaling curves for Dynamic Type.
    
     Legacy font scaling uses the older [UIFont mdc_fontSizedForMaterialTextStyle:scaledForDynamicType:
     category instead of the MDCFontScaler API.
    
     Default value is YES.
     */
    @property(nonatomic, readwrite, setter=mdc_setLegacyFontScaling:)
        BOOL mdc_legacyFontScaling __deprecated;
    
    /**
     Affects the fallback behavior for when a scaled font is not provided.
    
     If enabled, the font size will adjust even if a scaled font has not been provided for
     a given UIFont property on this component.
    
     If disabled, the font size will only be adjusted if a scaled font has been provided.
     This behavior most closely matches UIKit's.
    
     Default value is YES, but this flag will eventually default to NO and then be deprecated
     and deleted.
     */
    @property(nonatomic, assign) BOOL adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable;
    
    /**
     The minimum dimensions of the Chip. A non-positive value for either height or width is equivalent
     to no minimum for that dimension.
    
     Defaults to a minimum height of 32 points, and no minimum width.
     */
    @property(nonatomic, assign) CGSize minimumSize UI_APPEARANCE_SELECTOR;
    
    /**
     Custom insets to use when computing touch targets. A positive inset value will shrink the hit
     area for the Chip.
     */
    @property(nonatomic, assign) UIEdgeInsets hitAreaInsets;
    
    /**
     A block that is invoked when the MDCChipView receives a call to @c
     traitCollectionDidChange:. The block is called after the call to the superclass.
     */
    @property(nonatomic, copy, nullable) void (^traitCollectionDidChangeBlock)
        (MDCChipView *_Nonnull chip, UITraitCollection *_Nullable previousTraitCollection);
    
    /*
     A color used as the chip's @c backgroundColor for @c state.
    
     If no background color has been set for a given state, the returned value will fall back to the
     value set for UIControlStateNormal.
    
     @param state The control state.
     @return The background color.
     */
    - (nullable UIColor *)backgroundColorForState:(UIControlState)state;
    
    /*
     A color used as the chip's @c backgroundColor.
    
     Defaults to blue.
    
     @param backgroundColor The background color.
     @param state The control state.
     */
    - (void)setBackgroundColor:(nullable UIColor *)backgroundColor
                      forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
    
    /*
     Returns the border color for a particular control state.
    
     If no border width has been set for a given state, the returned value will fall back to the value
     set for UIControlStateNormal.
    
     @param state The control state.
     @return The border color for the requested state.
     */
    - (nullable UIColor *)borderColorForState:(UIControlState)state;
    
    /*
     Sets the border color for a particular control state.
    
     @param borderColor The border color.
     @param state The control state.
     */
    - (void)setBorderColor:(nullable UIColor *)borderColor
                  forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
    
    /*
     Returns the border width for a particular control state.
    
     If no border width has been set for a given state, the returned value will fall back to the value
     set for UIControlStateNormal.
    
     @param state The control state.
     @return The border width for the requested state.
     */
    - (CGFloat)borderWidthForState:(UIControlState)state;
    
    /*
     Sets the border width for a particular control state.
    
     @param borderWidth The border width.
     @param state The control state.
     */
    - (void)setBorderWidth:(CGFloat)borderWidth forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
    
    /*
     Returns the elevation for a particular control state.
    
     If no elevation has been set for a given state, the returned value will fall back to the value set
     for UIControlStateNormal.
    
     @param state The control state.
     @return The elevation for the requested state.
     */
    - (MDCShadowElevation)elevationForState:(UIControlState)state;
    
    /*
     Sets the elevation for a particular control state.
    
     @param elevation The elevation.
     @param state The control state.
     */
    - (void)setElevation:(MDCShadowElevation)elevation
                forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
    
    /*
     Returns the ink color for a particular control state.
    
     If no ink color has been set for a given state, the returned value will fall back to the value
     set for UIControlStateNormal. Defaults to nil. When nil MDCInkView.defaultInkColor is used.
    
     @param state The control state.
     @return The ink color for the requested state.
     */
    - (nullable UIColor *)inkColorForState:(UIControlState)state;
    
    /*
     Sets the ink color for a particular control state.
    
     @param inkColor The ink color.
     @param state The control state.
     */
    - (void)setInkColor:(nullable UIColor *)inkColor
               forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
    
    /*
     Returns the shadow color for a particular control state.
    
     If no shadow color has been set for a given state, the returned value will fall back to the value
     set for UIControlStateNormal.
    
     @param state The control state.
     @return The shadow color for the requested state.
     */
    - (nullable UIColor *)shadowColorForState:(UIControlState)state;
    
    /*
     Sets the shadow color for a particular control state.
    
     @param elevation The shadow color.
     @param state The control state.
     */
    - (void)setShadowColor:(nullable UIColor *)shadowColor
                  forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
    
    /*
     Returns the title color for a particular control state.
    
     If no title color has been set for a given state, the returned value will fall back to the value
     set for UIControlStateNormal.
    
     @param state The control state.
     @return The title color for the requested state.
     */
    - (nullable UIColor *)titleColorForState:(UIControlState)state;
    
    /*
     Sets the title color for a particular control state.
    
     @param titleColor The title color.
     @param state The control state.
     */
    - (void)setTitleColor:(nullable UIColor *)titleColor
                 forState:(UIControlState)state UI_APPEARANCE_SELECTOR;
    
    @end
  • Metrics of the Material shadow effect.

    These can be used if you require your own shadow implementation but want to match the material spec.

    See more

    Declaration

    Objective-C

    @interface MDCShadowMetrics : NSObject
  • The Material shadow effect.

    @see https://material.io/guidelines/what-is-material/elevation-shadows.html#elevation-shadows-shadows

    Consider rasterizing your MDCShadowLayer if your view will not generally be animating or changing size. If you need to animate a rasterized MDCShadowLayer, disable rasterization first.

    For example, if self’s layerClass is MDCShadowLayer, you might introduce the following code:

    self.layer.shouldRasterize = YES;
    self.layer.rasterizationScale = [UIScreen mainScreen].scale;
    
    See more

    Declaration

    Objective-C

    @interface MDCShadowLayer : CALayer
  • MDCCornerTreatment is a factory for creating MDCPathGenerators that represent the path of a corner.

    MDCCornerTreatments should only generate corners in the top-left quadrant (i.e. the top-left corner of a rectangle). MDCShapeModel will translate the generated MDCPathGenerator to the expected position and rotation.

    See more

    Declaration

    Objective-C

    @interface MDCCornerTreatment : NSObject <NSCopying>
  • MDCEdgeTreatment is a factory for creating MDCPathGenerators that represent the path of a edge.

    MDCEdgeTreaments only generate in the top quadrant (i.e. the top edge of a rectangle). MDCShapeModel will transform the generated MDCPathGenerator to the expected position and rotation.

    See more

    Declaration

    Objective-C

    @interface MDCEdgeTreatment : NSObject <NSCopying>
  • MDCPathGenerator is a factory for creating CGPaths. Describe your path with the lineTo and addArc… methods, then call appendToCGPath to append them to a CGPath.

    Note

    MDCPathGenerators always start at (0, 0) and end at @c endPoint.
    See more

    Declaration

    Objective-C

    @interface MDCPathGenerator : NSObject
  • An MDCShapeGenerating for creating shaped rectanglular CGPaths.

    By default MDCRectangleShapeGenerator creates rectanglular CGPaths. Set the corner and edge treatments to shape parts of the generated path.

    See more

    Declaration

    Objective-C

    @interface MDCRectangleShapeGenerator : NSObject <MDCShapeGenerating>
  • MDCShapedView is a primitive view class which makes it easy to style the shape of the view’s edges and corners.

    MDCShapedView manages mapping the paths generated by the shapeGenerator to the backing CAShapeLayer whenever the view is resized.

    See more

    Declaration

    Objective-C

    @interface MDCShapedView : UIView
  • 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
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface MDCTextInputBorderView : UIView <NSCopying>
    
    /**
     The color of the area inside the border.
    
     Default is clear.
     */
    @property(nonatomic, nullable, strong) UIColor *borderFillColor UI_APPEARANCE_SELECTOR;
    
    /**
     The path of the area to be highlighted with a border. This could either be with a drawn line or a
     drawn fill.
    
     Note: The settable properties of the UIBezierPath are respected (.lineWidth, etc).
    
     Default is a rectangle of the same width as the input with rounded top corners. That means the
     underline labels are not included inside the border. Settable properties of UIBezierPath are left
     at
     system defaults.
     */
    @property(nonatomic, nullable, strong) UIBezierPath *borderPath UI_APPEARANCE_SELECTOR;
    
    /**
     The color of the border itself.
    
     Default is clear.
     */
    @property(nonatomic, nullable, strong) UIColor *borderStrokeColor UI_APPEARANCE_SELECTOR;
    
    @end
  • 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>