One Logo Pool Ball
UIKit · IOS API REFERENCE

UIFontMetrics

class · iOS 11.0+ · SDK 27.1

class UIFontMetrics

Members (8)

get · iOS 11.0+

default

TypeScript
static get default(): UIFontMetrics
Swift declaration
class var `default`: UIFontMetrics { get }
init · iOS 11.0+

init

TypeScript
static init(textStyle: UIFont_TextStyle): UIFontMetrics
Swift declaration
init(forTextStyle textStyle: UIFont.TextStyle)
method · iOS 11.0+

scaledFont

TypeScript
scaledFontFor(font: UIFont): UIFont
Swift declaration
func scaledFont(for font: UIFont) -> UIFont
method · iOS 11.0+

scaledFont

TypeScript
scaledFontForCompatibleWith(font: UIFont, traitCollection?: (UITraitCollection) | null): UIFont
Swift declaration
func scaledFont(for font: UIFont, compatibleWith traitCollection: UITraitCollection?) -> UIFont
method · iOS 11.0+

scaledFont

TypeScript
scaledFontForMaximumPointSize(font: UIFont, maximumPointSize: number): UIFont
Swift declaration
func scaledFont(for font: UIFont, maximumPointSize: CGFloat) -> UIFont
method · iOS 11.0+

scaledFont

TypeScript
scaledFontForMaximumPointSizeCompatibleWith(font: UIFont, maximumPointSize: number, traitCollection?: (UITraitCollection) | null): UIFont
Swift declaration
func scaledFont(for font: UIFont, maximumPointSize: CGFloat, compatibleWith traitCollection: UITraitCollection?) -> UIFont
method · iOS 11.0+

scaledValue

TypeScript
scaledValueFor(value: number): number
Swift declaration
func scaledValue(for value: CGFloat) -> CGFloat
method · iOS 11.0+

scaledValue

TypeScript
scaledValueForCompatibleWith(value: number, traitCollection?: (UITraitCollection) | null): number
Swift declaration
func scaledValue(for value: CGFloat, compatibleWith traitCollection: UITraitCollection?) -> CGFloat

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UIFontMetrics.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All UIKit types →