How to use UIFontMetrics in storyboard in swift 5

122 Views Asked by At

I am Kickbell.

I'm trying to improve accessibility in my app. So, I am solving the problem by referring to the official documentation below. https://developer.apple.com/documentation/uikit/uifont/scaling_fonts_automatically

But I have a question.

Since I programing with a storyboard, the code below is not the way I want it to be.

let font = UIFont(name: "AvenirNext-Regular", size: 18.0)!
label.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: customFont)

Is there a way to use @IBInspectable and @IBDesignable ?

thanks for your help.

0

There are 0 best solutions below