ios – Dynamic Textual content Sizing in NSAttributedString


I am making an attempt to help Giant Font Accessibility within the app. There are locations the place we’re utilizing NSAttributedString to set the attributedText of a UILabel.

On UILabel, we have set adjustsFontForContentSizeCategory = true. Additionally, within the attributes, we’re utilizing UIFontMetrics to permit the label to adapt to the dimensions adjustments.

UIFontMetrics(forTextStyle: .caption2).scaledFont(for: UIFont.systemFont(ofSize: 11))


After I run the app, the UILabel shows the attributedText as per the machine’s present Measurement Class. However, after I change the dimensions class from machine’s accessibility settings, the UILabel just isn’t up to date accordingly.

Can somebody please assist me resolve this subject?


Leave a Reply