UIFont

extension UIFont
  • Returns an instance of UIFont with the specified style and weight, that supports Dynamic Type.

    Declaration

    Swift

    @available(iOS 11, *)
    public static func preferredFont(for textStyle: TextStyle, weight: Weight) -> UIFont

    Parameters

    textStyle

    Required. The text style to use as base.

    weight

    Required. The font weight to apply.