MDCTextInputControllerFloatingPlaceholder

@protocol MDCTextInputControllerFloatingPlaceholder <MDCTextInputController>

Controllers that have the ability to move the placeholder to a title position.

  • The color applied to the placeholder when floating and the text field is first responder. However, when in error state, it will be colored with the error color.

    Only relevent when floatingEnabled is true.

    Default is floatingPlaceholderActiveColorDefault.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable)
        UIColor *floatingPlaceholderActiveColor;
  • Default value for floatingPlaceholderActiveColor.

    Default is activeColor.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable, class)
        UIColor *floatingPlaceholderActiveColorDefault;
  • The color applied to the placeholder when floating. However, when in error state, it will be colored with the error color and when in active state, it will be colored with the active color.

    Only relevent when floatingEnabled is true.

    Default is floatingPlaceholderNormalColorDefault.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable)
        UIColor *floatingPlaceholderNormalColor;
  • Default value for floatingPlaceholderNormalColor.

    Default is black with Material Design hint text opacity (textInput’s tint).

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable, class)
        UIColor *floatingPlaceholderNormalColorDefault;
  • When the placeholder floats up, constraints are created that use this value for constants.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UIOffset floatingPlaceholderOffset;
  • The scale of the the floating placeholder label in comparison to the inline placeholder specified as a value from 0.0 to 1.0. Only relevent when floatingEnabled = true.

    If nil, the floatingPlaceholderScale is @(floatingPlaceholderScaleDefault).

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable)
        NSNumber *floatingPlaceholderScale;
  • Default value for the floating placeholder scale. NOTE:Setting this value to 0 or lower would automatically set the scale to default. Default is 0.75.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, class)
        CGFloat floatingPlaceholderScaleDefault;
  • If enabled, the inline placeholder label will float above the input when there is inputted text or the field is being edited.

    Default is floatingEnabledDefault.

    Declaration

    Objective-C

    @property (getter=isFloatingEnabled, assign, readwrite, nonatomic)
        BOOL floatingEnabled;
  • Default value for floatingEnabled.

    Default is YES.

    Declaration

    Objective-C

    @property (getter=isFloatingEnabledDefault, assign, readwrite, nonatomic, class)
        BOOL floatingEnabledDefault;