Instance Method

scaledFontForFont:

Returns a version of the specified font that adopts the current font metrics.

Declaration

- (UIFont *)scaledFontForFont:(UIFont *)font;

Parameters

font

The base font to use when applying the style information. Set the size of your font to the standard Dynamic Type size that you use for the corresponding content. Do not specify a font that has already been scaled; doing so results in an exception.

Return Value

A version of the specified font with the appropriate style information applied to it, and scaled to the current Dynamic Type setting.

See Also

Creating Scaled Fonts

Scaling Fonts Automatically

Scale text in your interface automatically by using Dynamic Type.

- scaledFontForFont:compatibleWithTraitCollection:

Returns a version of the specified font that adopts the current font metrics and supports the specified traits.

- scaledFontForFont:maximumPointSize:

Returns a version of the specified font that adopts the current font metrics and is constrained to the specified maximum size.

- scaledFontForFont:maximumPointSize:compatibleWithTraitCollection:

Returns a version of the specified font that adopts the current font metrics and is constrained to the specified traits and size.