mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-05 12:08:21 +08:00
839 B
839 B
Importing
Before using Typography, you'll need to import it:
Swift
import MaterialComponents.MaterialTypography
Objective-C
#import "MaterialTypography.h"
Font
Select a font most appropriate to its usage and set it as your label's font. All fonts are returned from class methods beginning with the font's Material Design type style and ending with 'Font'. Material Typography should be used consistently throughout the entire UI.
Opacity
Each font has a respective opacity (alpha) value returned by class methods beginning with the font's Material Design type style and ending with 'FontOpacity'. These CGFloats should be set on the label's alpha property. If animating alpha, it should be the maximum value reached.