Classes

The following classes are available globally.

  • A Material flat, raised or floating button.

    All buttons display animated ink splashes when the user interacts with the button.

    The title color of the button set to have an accessible contrast ratio with the button’s background color. To ensure this works for flat buttons (with transparent background), the caller is responsible for setting (and updating, if necessary) the button’s underlyingColor property.

    All buttons set the exclusiveTouch property to YES by default, which prevents users from simultaneously interacting with a button and other UI elements.

    See more

    Declaration

    Objective-C

    @interface MDCButton : UIButton
  • A flat MDCButton.

    Flat buttons should be considered the default button. They do not have their own background color, do not raise when touched, and have uppercased text to indicate to the user that they are buttons. Flat buttons should be used in most situations requiring a button. For layouts with many UI elements in which a flat button might get visually lost, consider using a MDCRaisedButton instead.

    Warning

    This class will be deprecated soon. Consider using @c MDCTextButtonThemer with an @c MDCButton instead.

    See more

    Declaration

    Objective-C

    @interface MDCFlatButton : MDCButton
  • A raised MDCButton.

    Raised buttons have their own background color, float above their parent slightly, and raise briefly when touched. Raised buttons should be used when flat buttons would get lost among other UI elements on the screen.

    Warning

    This class will be deprecated soon. Consider using @c MDCContainedButtonThemer with an @c MDCButton instead.

    Declaration

    Objective-C

    @interface MDCRaisedButton : MDCButton