You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Good afternoon!
Thanks for your library, it helped a lot in development. But I noticed that if you change the font size in the application, AttibutedText will not change size, to fix this you need to add this line:
textView.adjustsFontForContentSizeCategory = true
The text was updated successfully, but these errors were encountered:
Hi again,
Turns out adjustsFontForContentSizeCategory is not working as expected. As a workaround, you can make your view update when the content size category changes.
structContentView:View{@Environment(\.sizeCategory)privatevarsizeCategory:ContentSizeCategoryvartext:NSAttributedString{letresult=NSMutableAttributedString(string:"Hello world!")
result.addAttributes([.font:UIFont.preferredFont(forTextStyle:.title1)],
range:NSRange(location:0, length:5))
result.addAttributes([.font:UIFont.preferredFont(forTextStyle:.headline)],
range:NSRange(location:6, length:6))return result
}varbody:someView{AttributedText(text).padding()}}
Good afternoon!
Thanks for your library, it helped a lot in development. But I noticed that if you change the font size in the application, AttibutedText will not change size, to fix this you need to add this line:
textView.adjustsFontForContentSizeCategory = true
The text was updated successfully, but these errors were encountered: