Structure

UIFont.TextStyle

Constants that describe the preferred styles to use for fonts.

Overview

Pass these constants to the preferredFont(forTextStyle:) method of UIFont or the the preferredFontDescriptor(withTextStyle:) method of UIFontDescriptor to retrieve the corresponding font information.

Topics

Type Properties

static let body: UIFont.TextStyle

The font used for body text.

static let callout: UIFont.TextStyle

The font used for callouts.

static let caption1: UIFont.TextStyle

The font used for standard captions.

static let caption2: UIFont.TextStyle

The font used for alternate captions.

static let footnote: UIFont.TextStyle

The font used in footnotes.

static let headline: UIFont.TextStyle

The font used for headings.

static let subheadline: UIFont.TextStyle

The font used for subheadings.

static let largeTitle: UIFont.TextStyle

The font style for large titles.

static let title1: UIFont.TextStyle

The font used for first level hierarchical headings.

static let title2: UIFont.TextStyle

The font used for second level hierarchical headings.

static let title3: UIFont.TextStyle

The font used for third level hierarchical headings.

Relationships

See Also

Creating a Font Metrics Object

init(forTextStyle: UIFont.TextStyle)

Creates a font metrics object for the specified text style.

class var `default`: UIFontMetrics

The default font metrics object for content.