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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software