Initializer

init(forTextStyle:)

Creates a font metrics object for the specified text style.

Declaration

init(forTextStyle textStyle: UIFont.TextStyle)

Parameters

textStyle

The text style that you want to apply to the font. For example, you might specify body for your app's main content.

Return Value

An initialized font metrics object.

See Also

Creating a Font Metrics Object

class var `default`: UIFontMetrics

The default font metrics object for content.

struct UIFont.TextStyle

Constants that describe the preferred styles to use for fonts.