According to this article:
https://useyourloaf.com/blog/restricting-dynamic-type-sizes/
And this WWDC 2021 video:
https://developer.apple.com/videos/play/wwdc2021/10059/?time=879
The minimumContentSizeCategory and maximumContentSizeCategory can limit the min and max font size when user uplevel/downlevel the font sizes in System Accessibility settings.
However I tried it out, and from the debugging info these two settings are properly set, but in view rendering, the font size still goes to very large if accessibility font size is very large.
// before setting
print(label.appliedContentSizeCategoryLimitsDescription)
label.minimumContentSizeCategory = .small
label.maximumContentSizeCategory = .accessibilityMedium
// after setting
print(label.appliedContentSizeCategoryLimitsDescription)
print results:
UILabel:0x7fd610a414a0: AX-L --> AX-L
UILabel:0x7fd610a414a0: S <= (none->)AX-M <= AX-M --> AX-M
How can I properly use these two settings?
I hope that's the proper way because I use them as you did (and it works).
I created a blank project in
Interface Builder(Xcode 13.4.1) as follows:... and the
Dynamic Typefeature is blocked within the specified thresholds I defined like you (in theviewDidLoadof the view controller).I think you should check out the way you created your label because, with the above one, it works like a charm.