Structure

UIFontTextStyle

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: UIFontTextStyle

The font used for body text.

static let callout: UIFontTextStyle

The font used for callouts.

static let caption1: UIFontTextStyle

The font used for standard captions.

static let caption2: UIFontTextStyle

The font used for alternate captions.

static let footnote: UIFontTextStyle

The font used in footnotes.

static let headline: UIFontTextStyle

The font used for headings.

static let subheadline: UIFontTextStyle

The font used for subheadings.

static let largeTitle: UIFontTextStyle

The font style for large titles.

static let title1: UIFontTextStyle

The font used for first level hierarchical headings.

static let title2: UIFontTextStyle

The font used for second level hierarchical headings.

static let title3: UIFontTextStyle

The font used for third level hierarchical headings.

Getting the Current Font Metrics

var metrics: UIFontMetrics

The font metrics object representing the current style.

Relationships

See Also

Creating a Font Metrics Object

init(forTextStyle: UIFontTextStyle)

Creates a font metrics object for the specified text style.

class var `default`: UIFontMetrics

The default font metrics object for content.