...
Code Block | ||
---|---|---|
| ||
// If you need to scale your font, use our method `scaledFont()`.
Find the example below.
let configuration = GiniBankConfiguration.shared
let customFontToBeScaled = UIFont.scaledFont(UIFont(name: "Avenir", size: 20) ?? UIFont.systemFont(ofSize: 7, weight: .regular), textStyle: .caption1)
configuration.updateFont(customFontToBeScaled, for: .caption1)
// If you would like to pass us already scaled font.
let customScaledFont = UIFontMetrics(forTextStyle: .caption2).scaledFont(for: UIFont.systemFont(ofSize: 28))
configuration.updateFont(customScaledFont, for: .caption2) |
...