Instance Method

initForTextStyle:

Creates a font metrics object for the specified text style.

Declaration

- (instancetype)initForTextStyle:(UIFontTextStyle)textStyle;

Parameters

textStyle

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

Return Value

An initialized font metrics object.

See Also

Creating a Font Metrics Object

+ metricsForTextStyle:

Creates and returns a font metrics object for the specified text style.

defaultMetrics

The default font metrics object for content.

UIFontTextStyle

Constants that describe the preferred styles to use for fonts.