Type Method

monospacedSystemFont(ofSize:weight:)

Returns the fixed-width font used for standard interface text in the specified size.

Declaration

class func monospacedSystemFont(ofSize fontSize: CGFloat, weight: UIFont.Weight) -> UIFont

Parameters

fontSize

The size (in points) for the font. This value must be greater than 0.0.

Return Value

A font object of the specified size.

Discussion

This method provides the same font as the monospaced system font descriptor. For design guidance, see Typography in the Human Interface Guidelines.

See Also

Creating System Fonts

class func systemFont(ofSize: CGFloat) -> UIFont

Returns the font object used for standard interface items in the specified size.

class func systemFont(ofSize: CGFloat, weight: UIFont.Weight) -> UIFont

Returns the font object used for standard interface items in the specified size and weight.

struct UIFont.Weight

Standard font weights.

class func boldSystemFont(ofSize: CGFloat) -> UIFont

Returns the font object used for standard interface items that are rendered in boldface type in the specified size.

class func italicSystemFont(ofSize: CGFloat) -> UIFont

Returns the font object used for standard interface items that are rendered in italic type in the specified size.

class func monospacedDigitSystemFont(ofSize: CGFloat, weight: UIFont.Weight) -> UIFont

Returns the standard system font with all digits in constant width.