UIFont

public extension UIFont
  • UIFontProvider used to get the fonts associated with UIFontTextStyles.

    Declaration

    Swift

    static var fontProvider: UIFontProvider? { get set }
  • Returns the UIFont associated with the font text style provided. This functions takes into consideration the font name provided by fontProvider and the size provided by UIFont.preferredFont(forTextStyle:) to build the final UIFont returned.

    Warning

    This function may fail in runtime is the font provided by the fontProvider property is not a valid one (because it doesn’t exist or it isn’t added in the bundle).

    Seealso

    UIFont.fontProvider and UIFont.preferredFont(forTextStyle:)

    Declaration

    Swift

    static func appFont(for style: UIFont.TextStyle) -> UIFont

    Parameters

    style

    The app’s font style we want to use.